Refactor xsrfutil
keyring is optional dependency.
Python 2.6 has io.StringIO
Merge pull request #45 from methane/python3

[python3] refactoring