Updated examples to work in Python 3.

Fix warnings on install due to failure to compile example scripts under Python 3.