tools, pydfu: Some fixes to support Python 3.