Implemented a stack for directory changes which resolves an issue where the last project (with dependencies) wouldn't be found.