Use determine_ext when saving the thumbnail

Urls that contain a query produced filenames with wrong extensions
Don't try to save the thumbnail if it's None

It means the extractor couldn't find it