Fix for GH9992 - use create_tempfile to remove permission-related errors when running tests
Fixes #9992.

I wanted to take a stab at developing pandas. I am a novice at both git/github and I hope I did the merge and PR correctly.

@jreback, please let me know if there is anything I can fix.
