Filesystem: Add better file type checks