Adds unit tests, improves structure, fixes bugs

* Default options are better usable
* uses underscore for heavy lifting of data

As usual when adding tests, I fixed a bunch of errors:
* doesn't treat helper files as test files (e.g. test_helper.coffee)
* don't treat image files in the test directory as test files

Plus now we can add more functionality, and check that option merging works.

Travis-CI seems hosed (again), so I'll add CI to this later.