Added :gsub("\\\n","\\n") to string serialization

this is because string.format("q","\n")=="\\\n"
which can break some database programs