Hello,
the command "cd .. " doesn't work when there is extra spaces at the end.
I propose this patch and ask for your confirmation about it.
best regards.