ConfigUtil.pm: extract config file reading code