Get the base name of a path (i.e. remove the last component)
If this path is the root directory, return InvalidPath.
Get the base name of a path (i.e. remove the last component)
If this path is the root directory, return InvalidPath.