Fixes #634: Clear all git locks after obtaining deployment lock.