Various changes related to Python3 string types
Use python 3 urllib for gravatar url generation
Fixed another absolute import + minor coding style fix
Images, use python3 BytesIO if available
Fixed Python3 incompatible dictionary concatentation