Made more portable by switching from ~ to process.env.HOME