function to work out mime type from file name where needed
improve HTML to TEI and make test for it