Implemented exit code handling.

Per https://github.com/kbrei/pipes-shell/issues/8, this is likely pending on generalisation of some types in `Pipes.Prelude` (see [this patch](https://github.com/Gabriel439/Haskell-Pipes-Library/pull/128), also comments [here](https://github.com/Gabriel439/Haskell-Pipes-Library/commit/64159609563a060007860e62f9c3febf0591b5b3#comments).) The diff on the test suite seems to indicate this is a good idea.