Exit with correct error code after tests

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>