fixed failure count so that non-zero exit code is return on test failure