Problem: inelegant exit code in cmdpipe handler

Solution: simplify this.
Merge pull request #165 from hintjens/master

Problem: inelegant exit code in cmdpipe handler