fix for ticket:2951: wait for the logs are created before finishing the step

There is a race condition between addLogs calls, and the end of the step.

for oldStyleSteps, this matters, because the subsequent addStderr, are only called
at the end of the step, so we must wait for log are created before continuing

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
If that's OK by you, cherry-pick it into this pull req, or let me know and I'll merge both.