Fix and improve testing.

The previous pull request exposed an error in our tests.  I've patched that and made some simple changes to our Travis setup.   I also fixed the README Travis badge to point to the correct url.