io / tempfile fixes for appengine