Fix attachment filename handling

Attachment#write_to_disk created its temporary file with a shell-escaped name.
Passing the path to this file to write_to_disk's block parameter and returning
it created a double-escape problem, which rendered attachments with e.g. spaces
in the filename unusable.

Fixed by creating the file with the original name (Tempfile.new doesn't pass
through the shell to this is safe) and then passing on the name shell-escaped.