Py3 support

While testing web-core for py34, I found issues in other repos.  These were some simple changes that allows the codebase to be portable among 2.7, 3.4.