If the path is absolute (e.g., /foo/bar) the returned basename will be the empty string.