external.py: Adds py3 compatibility to tests

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