Minor tests refactoring: using rule to clean up files created by command
line tests.