Set failure exit code on error

Handy if you're using continous integration.