code: function instrumentDir(options) {
      if (!options.outputDir) {
          options.outputDir = temp.mkdirSync();
      }
      if (options.instHandler) {
          setupConfig(options.instHandler);
      }
      var deferred = Q.defer();
      instDir.instrument(options, function (err) {
          clearConfig();
          if (err) {
              deferred.reject(err);
          } else {
              deferred.resolve({ outputDir: options.outputDir});
          }
      });
      return deferred.promise;
  }
docs: instruments a directory.  see src/js/commands/instrument.js for details.
  creates a temporary output directory if none specified.
  @param options instrument options.  see src/js/commands/instrument.js
  @return promise|Q.promise promise that gets resolved at the end of instrumentation