Fixed breaking changes for Python 3

The latest pymc isn't working in Python 3 any more, so I've fixed a couple of the problems.
See [this issue](https://github.com/pymc-devs/pymc/issues/181) for a few more details...