Added more sanity to the STDOUT and STDERR handling by adding some flushing.
Authored by: bugman 2010-01-07
Parent: [r10134]
Child: [r10136]