core: Setup the tmp_path before calling setup_home_path [GH-3095]