added lockfiles, which will prevent contention during writes and merges

If two processes try to execute the pathways indicated simulataneously
it might put the repo into a bad state.  The use of the lockfile gem
would hopefully prevent that from occurring here.