Python 3 support

By far, dealing with byte vs. unicode strings was the bulk of this work. In most cases, I tried to work around these differences by adding expressions that end up evaluating correctly in both Python 2 and 3. There are a couple cases where I imagine there must be simpler solutions.

tox reports:
```
  py27: commands succeeded
  pypy: commands succeeded
  py34: commands succeeded
  congratulations :) 
```