Made mapcrafter_textures.py compatible with python3.