Python has a tempfile module that will handle this all for you.  Right now if two calls were made to this line at the same time, they would clobber each other.