Add method to clean-up the downloaded file extension

The extension of the downloaded file is retrieved by inspecting
the HTTP headers (using opened.headers.subtype).
Only little drawback is that JPEG files end up with the .jpeg extension
and we would prefer the more common .jpg extension.

This new method just use a look-up table to switch undesired extensions
with the desired one, or just to let it pass through in the general case.

Add unit tests as well.