Fix exit code was not grabbed correctly.

Fixes GH-180.