Added try/catch block to avoid errors when stderr is closed.
Merge pull request #165 from rupertlssmith/ioexception

Added try/catch block to avoid errors when stderr is closed.