Wrote some unit test for output parsing. Made a few changes to properly handle empty files and such.