Fixed path handling in cd