Switch to using an explicit temporary name, rather than NamedTemporaryFile, since pyfits < 2.3 won't work with that either.
(#299)