Improved validation of the mime type by adjusting the regexp to exclude things that
can't appear in tokens.