escape \n and \r for csv export