Add NODE_PATH to support Rails asset paths

* add logging support
* change config a little bit so have another top level with
  debug option (log) and the script directives under javascript: