Fix REPL when env.HOME isn't available - #2945