docs: function readDefaultModules (pkgDir) { return function (pkg, cb) {
    log.verbose(pkg._id, "readDefaultModules")
    var lib = pkg.directories && pkg.directories.lib || pkg.lib
      , libDir = path.join(pkgDir, lib).replace(/\/+$/, '')
    if (!lib) return cb(null, pkg)
    // create a modules hash from the lib folder.
    pkg.modules = {}
    var cut = pkgDir === "." ? 0 : pkgDir.length + 1
      , libCut = pkgDir === "." ? lib.length - 1 : libDir.length + 1
    find(libDir, function (er, filenames) {
      if (er) return cb(er)
      filenames.filter(function (f) {
        return !f.substr(libCut).match(/(^|\/)\./)
      }).forEach(function (filename) {
        // filename = path.basename(filename, path.extname(filename))
        var key = filename.substr(libCut)
          , val = filename.substr(cut)
        key = key.replace(/\.node$/, ".js")
        if (key.length && val.length) pkg.modules[key] = val
      })
      // require("foo/foo") is dumb, and happens a lot.
      var nameMod = pkg.modules[pkg.name] || pkg.modules[pkg.name+".js"]
      if (!pkg.main
          && !pkg.modules.index
          && !pkg.modules["index.js"]
          && nameMod) {
        pkg.modules["index.js"] = nameMod
      }
      log.silly(pkg.modules, pkg._id+".modules")
      return cb(null, pkg)
    })
  }}