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

`'Error: ' + ` here is not required as the try catch in the bin file adds the string as well.