fix: app dir with `next dev` and `output: export` (#47171)
This PR is a follow up to PR #47022 which broke `next dev`.
A test has been added to confirm `next dev` works as expected.
fix NEXT-825 ([link](https://linear.app/vercel/issue/NEXT-825)) ([NEXT-825](https://linear.app/vercel/issue/NEXT-825))