Return proper exit code.

Return exit code 1 when there are failure or error tests.

This fixes the problem with Travis and other CI who takes the `exit code` to define if tests run ok.