Replicate 'cd <last-opened-dir>' feature without using DEBUG signal