Use JUnit TemporaryFolder class to ensure test file deletion after tests