code: function realDestinationPath(file, from_dir, to_dir)
  {
      var length = from_dir.length;
      var from_dir_path = file.substring(length, file.length);
      return to_dir + from_dir_path;
  }
docs: create the real dest path with intermediate dirs