Fixes a unicode bug in the tree_to_json output.
This also has the added effect of removing the newline characters.