Fix title escaping issue that caused newlines to be rendered before the prompt when cwd contained more than 1 space.