Merge from master
Fix up logging in test-rules.py