NodeExecutorBase: Detect change before writing

Fixes #1069 and #1224.

Also, adds JsCompileBase for CoffeeScript, LiveScript and SweetJS.