Added mutex around the code that utilizes nodegit. Prevents segmentation faults.

I hope this will be temporary.