Made notebook testing scripts Python 3 compatible

Notebook testing now works within Python 2 or 3 but pickling does not
work across Python versions.