enable python2.5 compatibility with tempfile

Also, fixing the 3-space indentation.