helper.run_command: avoid race condition
helper.run_command: avoid race condition

avoid a race condition where pipe_process.poll() is not None but the
pipe_process.stdout is unread.

Change-Id: I2e9f88c2dd3e5a8c40f721011e954ac1811e0163

redhat-cip/python-dciclient,redhat-cip/python-dciclient