Make automatic cd example more robust

The previous example would hinder the use of some other plugins such as
fugitive.

Closes #11.