Improve PATH setting in tests