When outputting a commands stdout / stderr / exitcode,
the shell was free to interlace different outputs.
This could trip the parsing of the output, leading
to the shell missing the exit code of a command.
When that happened, the caller might wait indefinitely
for a result that would never come.
To workaround, the shell script now writes each command output
to a temporary file first, which is then written to stdout
by a single subshell, that way guaranteeing that the output
of multiple commands will not interleave
Change-Id: I9d8e7e788f5922c612ff533e5ba063f61a22aa8c
Reviewed-by: hjk <hjk@qt.io>