When checking for lockfile directory, actually check for the directory and not the file