Fix process.env.HOME call which is not cross platform