Another attempt at properly expanding homedir