Files: set the proper mimetype when creating a new text file

this fixes newly created text files not always having the correct mimetype untill the interface is reloaded.

cc @karlitschek @MTGap @DeepDiver1975