Csv rfc fixes

Proper escaping and new unit tests as discussed with @dhalperi.