Update FormatThumbnail.php

Adding $media->setExtension (in another edit) to change extension.
It is inpossibile to have images in, for example, jpg if you have png source.