Make #format more robust and delete unused files

Fixes #236

Previously, when we would have an image in a Tempfile, and change the format,
the new file wouldn't be wrapped in a Tempfile anymore, which means it wouldn't
get deleted by the garbage collector. That means the size of the temp folder
would constantly increase, which is bad.

I decided to use `convert` instead of `mogrify` for conversion, because with
it I can control the output path. We generally use `mogrify` in order for changes
to happen in-place, changing formatting is the only place where `mogrify` acts
the same way as `convert` -- it makes a copy.