Make std.file.getAttributes safe
Merge pull request #2496 from tom-tan/safe-file-getAttributes

Make std.file.getAttributes safe