Added a new constructor to TemporaryFile to allow explicitly setting the temp file.