findFile = function findFile (configPath, filename) {
  var HOME = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,
      dirname = null,
      parentDirname = null;

  configPath = configPath || path.join(process.cwd(), filename);

  if (configPath && fs.existsSync(configPath)) {
    return fs.realpathSync(configPath);
  }
  dirname = path.dirname(configPath);
  parentDirname = path.dirname(dirname);

  if (dirname === null || dirname === HOME || dirname === parentDirname) {
    return null;
  }
  configPath = path.join(parentDirname, filename);

  return findFile(configPath, filename);
}
Attempts to traverse the tree looking for the specified file

@param {String} configPath - The path to look for the file.
@param {String} filename - The name of the file.
@returns {String} The resolved path