Fixed directory issues in FileIO

FileIO no longer tries to read subdirectories as if they were files.
Also, FileIO now checks that the vocab directory exists before trying to
read it.