convert bug dir to unit tests. add unit test for csv output
Merge pull request #252 from ndawe/master

MRG: convert bug dir to unit tests. add unit test for csv output