Addressing breaking IFileSystem changes

@pranavkm
You could get away by doing
`path = Path.GetDirectoryName(path);` here and not doing a `string.IsNullOrEmpty` check. That would happen as part of the `while` loop below.