Resolve HOME properly.