Make a better file lock mechanism. It should also work on architectures
without flock ?
