Use mimetypes module rather than try to implement our own