Improve error diagnostics in t/test_pl/tempfile.t

Tony: add a missing local
Test that tempfile() in t/test.pl skips files that already exist
Add register_tempfile() to t/test.pl

This convenience function causes files to be removed in the same
way that tempfile() does.

It uses the same variable that tempfile() does, to catch and
warn on any collisions.
Make sure that tempfile() in t/test.pl removes the temp files

Run a program within t/test_pl/tempfile.t that uses tempfile() to make
sure that the temp file is removed when the tests are done.
[perl #121207] test.pl tempfile() improvements