integcli: fix race in runCommandWithStdoutStderr

This PR should fix or at least make it easier to debug failing tests. There was a race in runCommandWithStdoutStderr.
`stdoutBuffer.String()` might be more idiomatic