Test against nonzero exit codes

Previously, the exit code defaulted to zero if the command completed without timing out. This made it impossible to assert an expectation for a nonzero exit code. This fixes that.