This maintains accuracy in the context of datadirectory changes,
e.g. #12722
Also drop the related arguments to GetConfigFile and ReadConfigFile, and follow the example of GetDebugLogPath by calling GetArg within the GetConfigFile function.