check before calling cd
deer starts a directory up