Bug 995599 - Add lock when building cartridge repository

* When building cartridge repository protect from an additional
  openshift mcollective agent being started