Attempt to fix Darwin unittest failures

This is based on a suspicion that the echo statement in Darwin does not
flush immediately, and that the error stream gets flushed before the
output stream when a script terminates.