Refactoring error stderr dup2 return code incorrectly checked.
This was not caught by the test suite b/c it runs everything in
the foreground.