updated ./maintain_routes.py to work with python3