Make sure tempfile is in binmode before minimagick writes to it