Save temporary file in right encoding (as ST2 will do)

Save buffer to file with right encoding as it would be save by ST2