Fixed fd leak
Merge pull request #90 from ichizok/fix-fd-leak

Fix fd leak
Ignore tty in pipe.
Fixed stderr handling
Merge pull request #91 from ichizok/fix-hstderr

Fix stderr handling