Merge pull request #349 from CGenie/cgenie

Fix some Python2 backwards-incompatibility issues
Merge pull request #352 from CGenie/cgenie

PY2 compatibility: forgot about urlunsplit
Minimum required six id 1.5.2