Fixed a couple of minor issues with file system calls.