Using the temporary file flags didn't work.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>