Ensure Token.generate_key returns a string.
Python < 3 compatibility.
Better Python < 3 compatibility.
Merge pull request #1549 from maxpeterson/decode-generate-key

Ensure Token.generate_key returns a string.