Fix a problem where test data files cannot be unlinked on Windows

The handles of generated test data files were left open, which can lead
to problems on Windows based systems where files cannot be deleted, and
unlink() throws "permission denied" errors.
Merge pull request #60 from ndm2/windows-test-data-delete-fix

Fix a problem where test data files cannot be unlinked on Windows