Identify .txt files as text correctly

In the file fetcher was incorrectly looking for file extension .text
instead of .txt before, so File::MMagic would always be called. We
assume .txt files are always plain text so this call is not necessary.

Also improved test coverage for empty files and files without a known
extension.