Only quote newline characters where necessary. fixes #1484

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
tahoe_ls.py: JSON responses don't need quotemarks or quoted newlines.

Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>