correctly escape separator character when printing csv