Instead of deleting the files by calling rm, wouldn't it be better to just close the file handles and let tempfile delete them?
Instead of deleting the files by calling rm, wouldn't it be better to just close the file handles and let tempfile delete them?