Make FileSystemEntry.parentPath null for root directories

`FileSystemEntry.parentPath` should be null for root directories like `/` or `C:/`. This pull request fixes that and adds a unit test as confirmation. Addresses #5891.