simplyfy mimetype parsing of 'file' output

nut much, but I spent the whole day debugging stable45 because of this. I came up with this solution, which seems cleaner an simpler to me. I'll add a pr for 45, too.