Clearly delineate some of the parts of the compiler

* Adds a stream interface wrapper to simplify interfacing with node.js
  inputs
* Extract the compiler function from the mechanics of interfacing with
  the commandline.
Merge pull request #21 from aredridel/extract-compiler

Clearly delineate some of the parts of the compiler