Do cd also for directories with spaces.

Code duplication is evil, should do something with it.