Show the exit code in the prompt if non-zero.

Taken from http://stackoverflow.com/q/4466245.