Simplify CSV creation + add tests

Currently it's quite easy to introduce regressions into the CSV writer classes because of the way the keys and values are separated.  This pull request alters the way lines are written to prevent headings going out of line with values. Also I've covered both CSV classes with basic tests.

I think the writer classes would be easier to test if they took an \SplFileObject instead of a filename. Any thoughts on that?