docs: def copydir(orig, dest):
      """
      copies directory orig to dest. Returns a list of tuples of
      relative filenames which were copied from orig to dest
      """
  
      copied = list()
  
      makedirsp(dest)
  
      for root, dirs, files in walk(orig):
          for d in dirs:
              # ensure directories exist
              makedirsp(join(dest, d))
  
          for f in files:
              root_f = join(root, f)
              dest_f = join(dest, relpath(root_f, orig))
              copy(root_f, dest_f)
              copied.append((root_f, dest_f))
  
      return copied