Do not record line breaks in results csv file.

The csv file becomes unreadable when the error text includes line breaks. This pull request converts those line breaks to literal \n characters.