[Support/LockFileManager] Make the LockFileManager more robust against races.