Make TestFileFromUpload slightly more robust

(Helps with django 1.6 transition)