Moved the test file setup and cleanup into before and after blocks.