test: replace occurrences of $PWD with vars that are more stable