Fix broken flushing workaround.
Fix broken flushing workaround.

The logic for flushing here was inverted, so it didn't work. We actually
want to flush stdout and stderr if any subprocesses will have direct
access to either stdout or stderr, to ensure that if subprocesses write
directly to the filehandles, we won't have interleaved output.

BUG=none
TEST=Unit tests. Remote trybot run.

Change-Id: I045a80ad54e16f63067d77b2b99af0ae0da463dd
Reviewed-on: https://gerrit.chromium.org/gerrit/23095
Reviewed-by: David James <f231dc574bbeb62604660cbc162d1b8642a0a3af@chromium.org>
Tested-by: David James <f231dc574bbeb62604660cbc162d1b8642a0a3af@chromium.org>
Commit-Ready: David James <f231dc574bbeb62604660cbc162d1b8642a0a3af@chromium.org>

chadversary/chromiumos.chromite,bpsinc-native/src_third_party_chromite,coreos/chromite,bpsinc-native/src_third_party_chromite,zhang0137/chromite,zhang0137/chromite,bpsinc-native/src_third_party_chromite,coreos/chromite,coreos/chromite,zhang0137/chromite,chadversary/chromiumos.chromite