Add correct handling of special csv characters

* Ensures csv values with special characters (commas, quotes and newlines)
  are correctly enclosed in double quotes
* Escapes any pre-existing double quotes for enclosed values
Merge pull request #306 from rmorrin/csv-fix

Add correct handling of special csv characters