Create the lock directory if it does not exist.

The lock directory is merely a file that is dropped and can easily be
fstat() to see if any open file descriptors are there.