python3 bytes fix that actually works

Prior to this get_cert was broken.