code: function rename(files) {
    return function(file) {
      var base = path.relative(path.resolve(file.cwd), file.base);
      var destBase = files.options.destBase;
      file.dirname = path.resolve(path.join(destBase, base));
      return file.base;
    };
  }
docs: Custom rename function