use exit code

This makes the unit tests exit with 0 or 1 depending on the success. We can use this to integrate them with out travis.