proper handling of STDOUT and STDERR
Merge pull request #173 from tymoteuszsielach/master

Fixes #968 - Proper handling of STDOUT and STDERR