Fix CSV, close #984
Merge pull request #993 from pdalpra/csv-fix

Fix stats.csv, close #984
Replace scalaz.Validation with own simple Monad
Fix build and add missing headers