Refactor

 - Added JSHint
 - Refactored code to match Mammal JS style guide
 - Split CLI out from lib
 - Added test framework and some initial tests
 - Some general cleanup
 - Fixed stdin listener
 - Whole load of comments

This should be wrapped in a `Q.fcall()` that is returned, then we always get errors in the promise context.