Update dodge.py for better support for versions of Python other than 2.7