Fix a problem where a space in CWD broke gen_prompt_text