test: pip_list: Fix replacement pattern computation (#2237)
## Summary
Fix computing replacements pattern for pip_list tests to count
characters in the original directory string rather than the
regex::escape'd string. The latter yields incorrect results if the
workspace path contains characters such as `-` or `.`.
Fixes #2232
## Test Plan
`cargo test --test pip_list` in a directory named `uv-test` to provoke
the bug.