abf/abf-ideas#83: lock repository on publishing
abf/abf-ideas#83: added debug info
abf/abf-ideas#83: small refactoring
Merge pull request #28 from abf/mdv-scripts:83-lock-files-for-synchronisation-and-publishing
 abf/abf-ideas#83: lock files for synchronisation and publishing.