[FileManager] Don't crash if reading from stdin and stat(".") fails
addAncestorsAsVirtualDirs("<stdin>") quickly returns without doing work
because "<stdin>" has no parent_path. This violates the expectation
that a subsequent call to getDirectoryFromFile("<stdin>") would succeed.
Instead, it fails because it uses the "." if the file has no path
component.
Fix this by keeping the behavior between addAncestorsAsVirtualDirs and
getDirectoryFromFile symmetric.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266089
91177308-0d34-0410-b5e6-
96231b3b80d8