[fix] race condition in Shell#runcommand module of mcollective

Ready for review.

:warning: Don't merge before release.