Fix bug in how we determine if a FileSystemInfo object is a directory or a file.