Trivial changes for improved Py3 compatibility.

Some trivial code changes.

```
except Exception, e:
```
becomes
```
except Exception as e:
```

Fix a relative import not using relative import syntax.

Replace print "abc" in test cases with print("abc").