Merge pull request #1876 from Parlane/is_dir_fileio_fix Don't open a file handle for a directory in FileIO