fixed removing repositories, added some locking
Merge remote-tracking branch 'origin/pluginrepos' into peersandplugins