Fix tests

Adapted from @beatgammit's PR, with slight changes.

Closes #7.
Merge pull request #8 from beatgammit/readme-update

Add build status to README