Dir walking with stack