expand vars like $HOME used in config values too

patch to fix Issue #3475