Feature/rspec (incomplete, but started)

This is just to get started. If methods have a lot of side effects, let's not get too carried away for now. But some unit tests would be in order.

Mocking `sh` will be important.