Close temporary filehandle before checking for assoc. file

When checking for the existence of a file, be sure to close the
relevant filehandle so as to force a write.  This should hopefully
address http://www.cpantesters.org/cpan/report/232fa78c-6c36-1014-9b5a-e713937b1b84