Better quoting and formatting for twine2 output.
Fixed some whitespace and HTML quoting problems in twine2 format.