fixed file_lock.c, new tests added.