code: function removeDuplicates(files, duplicates) {
          var i;
          var ret = [];
          var found = {};
  
          if (duplicates) {
              for (i=0; i < duplicates.length; i++) {
                  found[duplicates[i].dst] = true;
              }
          }
  
          for (i=0; i < files.length; i++) {
              if (!found[files[i].dst]) {
                  found[files[i].dst] = true;
                  ret.push(files[i]);
              }
          }
          return ret;
      }
docs: Scan file specs and remove duplicates.
  
  @param files {Array} List of resolved file specs.
  @param duplicates {Array} Optional list of resolved file specs to consider duplicates.