Include base pyproject when initializing cache settings (#9480)
## Summary
Regression from
https://github.com/astral-sh/ruff/pull/9453/files#diff-80a9c2637c432502a7075c792cc60db92282dd786999a78bfa9bb6f025afab35L482.
Closes https://github.com/astral-sh/ruff/issues/9478.
## Test Plan
```
rm -rf .ruff_cache
cargo run -p ruff_cli -- check ../foo.py
```
Failed prior to this PR; passes afterwards. The file must be outside of
the current working directory, and must not have a `pyproject.toml` in
any parent directory.