Minor tidy-up.
Break the logic behind sizeToFit out into a class method, so that it
can be called without having to have the image data available.
Added utiMIMEToExtension.