Use the tokenizer within ord to prevent attributes from getting modified

Currently the `ord` method is also acting on attributes. I actually ran into this with base64 encoded images. I added a simplified test case and a few other missing tests for `ord`.