posix.dirname = function(path) {
  var result = posixSplitPath(path),
      root = result[0],
      dir = result[1];