Basename and mimereg