Move the initialization of push_dir, which calls getcwd, to early in main.