FIX: LF character was not escaped on MOLDing.
FIX: issue #525 (Tokeniser chokes on multi-line curlies).
FIX: new fix for issue #522.