Split up and make independent of yoob.js, for benefit of node.js.
Allow pixley.js to be run from command line using node.js.