Bug 1028261 - Fix to exit with a non-zero code on errors

Yep, this has caused our perf tests to fail :(