DetectCoreDirectoryFragment: Fix indentation

Also make a class function private.