Normalize stdout/stderr handling to a single sub

So we can be sure we will handle both the same way in the future (as there
were subtle differences in the past).  This does *not* fix any problems yet,
it just makes sure I need to fix it at only 1 place.