Add python2 support

The part I'm less confident in is that it swaps `int.from_bytes` out for `ord`, as `from_bytes` is a new python3 thing.

Could this have non-obvious implications? With `int.from_bytes` you get to pick the byteorder, but that shouldn't have any effect since it's used on exactly one byte from `urandom`.
Merge pull request #1 from uniphil/py2

Since there's only one byte needed per call, replace from_bytes with ord().
Add python2 support