for previous, test for and descend into correct directory