Fix the following problem. If input character contain '\n', the safe.write
function will write it literally, which makes extra lines.

And using MySql's "LOAD DATA LOCAL INFILE" will literally read them as more
rows than original.

Now we use encodeString to escape and quote the field to solve the problem.

Signed-off-by: Jinjing.Xie <jinjing.xie@gmail.com>