Fix global config load

This fix prevents an error when `$HOME` is not set in the build environment. (Then `~` can not be expanded)

I'm not sure how to write a unit test for this, so I didn't. Tried to use the branch on environments with and without `$HOME`, which worked as expected.
That is linux specific.  I wonder what the behavior would be on windows.  There is also an etc library that can give the home directory is the USER is either set or passed in. I think it can even check the passwd file.