Simplified test cases by relying on Apache Commons IO
Added support for writing compressed output files