Improve test_rules stability

A different was used each time, but the old files were not
deleted. Now the two reps are created before each test.