in reply to Philosophical question about testing

You could also address your concerns by refactoring your module a bit. Your module could have a subroutine/method to check that a file fulfils the criteria needed to be used by the module, whatever they are. Then there could be a separate sub/method that attempts to make a file compliant with your requirements and return "true" if it suceeds and "false" if it doesn't.
In your test script you would now create a good file and a bad file and the test would first assert that they are picked up accordingly by the checking-method.
Then you would pass the bad file through the secnod method and assert that it returns true. You should also create a file that can't be fixed and assert that your second method returns false on that one, meaning that the error can be picked up and handled.
Now you don't duplicate any code anymore, you just assert that your methods return the right thing.
You would then have something like:

ok( not file_is_usable( $bad_file ), "a bad file is identified correct +ly); ok ( make_file_usable ( $bad_file ), "can correct a bad file")
In addition, you have also made your methods more focused on one thing and reduced side-effects.