Small tweaks.
Fix issue with writeln(), add failing tests.
CS.
Workaround a bug in nodejs, issue #4750 of nodejs issue list.

Add failing tests.