flush temporary attachment files before viewing

I was having problems with the temporary attachment files being empty
when external programs (vim and w3m, and using system(), so blocking)
opened them from my mime-view hook. Flushing the content before yielding
in Attachment#write_to_disk fixes the problem for all the cases where I
encountered the problem.