cd-traverse: fix cd ..pattern

This patch fixes GH-9, related to cd_traverse_ancestor().