Add test for _exit_code from system_raw.
Correct exit code from os.system() on Unix.

Closes gh-2794
Merge pull request #2799 from takluyver/exit-code

fix `_exit_code` after running system calls

Correct the exit code to be a simple value, rather than two or three separate values stuffed into a single integer.

Closes #2794