   throw err if err?
   target = (path.join process.cwd(), project.project)
 
+  console.log target
   transform_dir fullpath, project, target
  targetStream.destroy()

  # replace each key with each replacement using sed
  args = ['-i']
  for key, rep of keys
    args += ['-e', "s/#{key}/#{project[rep]}/g"]
  args += [target]

  proc = child_process.spawn 'sed', args, {'stdio' : ['ignore', 'ignore', 2]}
  await proc.on 'exit', defer code


transform_dir = (dir, project, target) ->

  # create the destination
  await fs.mkdir target, defer err

  # now tranform each file and subdirectory.
  for file in files
    src_path = path.join dir, file
    target_path = path.join target, file

    # replace all keys
    for key, rep of keys
      target_path = target_path.replace key, project[rep]

    await fs.stat src_path, defer err, stats
    throw err if err?
