Fixed open tmp file in  python3
Make migration python 2.6 campatible