Altered test to ensure file is written and then deleted.