dirToRoot :: FilePath -> FilePath
dirToRoot p = case joinPath $ replicate (pathDepth $ splitPath p) ".." of
    "" -> "."
    x -> x
dirToRoot :: FilePath -> FilePath
dirToRoot p = case joinPath $ replicate (pathDepth $ splitPath p) ".." of
    "" -> "."
    x -> x
dirToRoot p = case joinPath $ replicate (pathDepth $ splitPath p) ".." of
    "" -> "."
    x -> x