Make update_plugin.py script compatible with Python 3