docs: function getRoot(term, opts) {
    var parts = term.split(path.sep);
    var root = parts.shift() || path.sep; // Windows support, I hope?
  
    // Last section treated as term if not suffixed by path separator.
    for(var i = 0; i < parts.length - 1; i++) {
      var tryPath = path.join(root, parts[i]);
      try {
        var stat = fs.statSync(tryPath);
        if(!stat.isDirectory()) {
          break;
        }
      } catch (e) {
        if(e.code === 'ENOENT') {
          break;
        }
        throw e;
      }
      root = tryPath;
    }
    root = util.normalizePath(root);
    return root;
  }