Store Media Extension in lowercase, compare formats in lowercase

* Media Uploading was failing because the extension was in uppercase
  but the class constants are in lowercase ("PNG" != "png")
* Fixed this by forcing the extension to lowercase during construction
  and forcing comparison to lowercase