Fix minion config when tmp dir is not created

I moved the creation of the tmp at the top and got rid of duplicate attempt of uploading state tree