Guess mimetype from filename if it has an extension