Fix repr tests and url quoting in bytes/strings