Fix loading of configuration file using wcfg

This also updates the required version of wcfg to v4, as it includes needed
fixes.