function findUniqueDirectories (path, res = new Set()) {
  if (!path) return res
  const name = dirname(path)
  if (name === '.') return res
  res.add(name)
  if (name === '/') return res
  return findUniqueDirectories(name, res)
}
@param {string} path
@param {Set<string>} [res]
@returns {Set<string>}