Add a bunch of missing decode("utf-8")s

This should improve compatibility with Python 3. Currently whenever there's an exception raise, the part that prints out the error message was causing another exception because `json.loads` expects `str` in Python 3.