Locking should be implemented

I need to test this, particularly the Chmod stuff and the unlock
mechanism. I had some trouble merging so hopefully this compiles for
you. Also, we need to Chmod files as soon as they're put in our
directory, or at least modify them. The code for chmod is
straightforward and I put in a note section so if you go to locking.go
you should be able to see it.