Fix an exception when parsing a multi-line command that ends in cd
https://github.com/fish-shell/fish-shell/issues/511