A first pass at writing tests using testthat.

These should be considered pseduocode right now - These are definitely the six
cases that each of the two main functions need to be tested on before committing,
but they don't work.

But that's more because I can't get any testthat code - including the examples that
ship with testthat - to work.