Fixed octal ints in tests

Many octal ints were specified like 0777 instead of 0o777, which is the new
preferred way for handling octal literals.
Fix exceptions for Python3

Replace usage of StandardError with Exception

StandardError is no longer supported as of 3.3, so we should just use
Exception. Clearer semantically anyway.
"Type, varname" is no longer valid for an except block. Py3 requires that this
is done using "as" -- fixed in one location.
Replace StringIO module with io

Needed to import unicode_literals before argparse in order for it to work
correctly when stderr is mocked with an io.StringIO
Fix for py3 compatible ConfigParser import

Try to import the py3 version, and catch an ImportError with an aliased import
of the py2 version.
Change from xrange() to range()

Doesn't much matter for this in terms of performance, and xrange is gone in
py3.
Made builtins mocking in tests Python3 compatible

Uses an import try-catch to determine the correct name for the builtins module.
Fix handling of strings for Python3

Switched use of string.letters to string.ascii_letters
Fixing logging with print(unicode(...)) requires some hackery of the "Are we
python 3?" variety. Basically, if unicode is not defined, we must be in
Python3, so redefine it as the desirable function.
Updates to hashing to make explicit calls to encode()
Recovered test coverage.

Remove some py2/3 compat code from coverage and added one test.
Any try/except import handling for compatibility should be excluded from
coverage, as there won't be any given run of the tests that explores both
codepaths. Coverage is still desired across python versions, but it's hard to
enforce that programmatically, and impossible with nose's coverage plugin.
Added py 3.2 to Travis file
Merge branch 'bugfix/py3-compat' into dev