Translate signal exits into valid exit codes

Fixes #32