Python 3 compatibility touchups

Hey there guys,

Just a few touch-ups to correct some little problems introduced with my Python 3 compatibility pull request.  The entire test suite now runs successfully on both Python 2.7 and 3.3.

**Update**: This pull request is now ready for a merge :smile: 

Cheers
Fotis