Fix up getDirectoryContents on Linux