Return number of failed tests as exit code

Fixes #175