Add 'strip-eol' option to SHELL. Also, return actual exit status.
Previously, with the 'exit-code' option SHELL would return raw value from waitXXX, with exit status shifted 8 bits to the left.
Fixes #4470.