Improve test file path generation.