integcli: fix race in runCommandWithStdoutStderr

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Merge pull request #8164 from unclejack/fix_utils_race

integcli: fix race in runCommandWithStdoutStderr