Get correct mime types for Flickr connector

The Flickr photos.getInfo API returns e.g. originalformat="png” (see
https://www.flickr.com/services/api/flickr.photos.getInfo.htm). We can
pass this to get_mimetype as a plain extension (modify the get_mimetype
function to allow simple extensions to be passed in).

Also correct string comparison operator to use ===, to avoid nasty PHP bugs.