testing: fix test_assertrewrite with PYTHONPYCACHEPREFIX
testing: fix test_assertrewrite with PYTHONPYCACHEPREFIX

Make the tests work when running with PYTHONPYCACHEPREFIX (possible when
running in a dirty environment, not under tox).

nicoddemus/pytest,pytest-dev/pytest,nicoddemus/pytest,Akasurde/pytest,markshao/pytest,RonnyPfannschmidt/pytest