external.py: Adds py3 compatibility

Adds py3 urllib imports, print function updates, and implicit
utf-8 decoding of test strings.