Will flock or lockf work on a directory? I there another way to lock a directory in C on a linux machine?