Python 3 support

All tests pass under 2.7 and 3.4.

This matches changes that I made to the copy of rsa_x509_pem that's bundled with https://github.com/leifj/pyXMLSecurity.