Increase test coverage

For #40 

This marks a couple of blocks that we can't practically reach in the tests as no cover, and adds a few tests to bring the coverage up a bit.

As mentioned on #69, I don't think 100% coverage needs to be the aim - with these changes, I'd be happy to close #40, though there are one or two other things that could be tested, e.g. reading from stdin.
Yeah, I don't mind not testing this.