runtests.py: exit with status 1 if there are errors or failing tests

Before this changeset runtests.py would exit with status code 0
even when tests were failing, tricking Travis-CI into thinking a
build was successful.