fixed a reference count error
all examples run under python 2
added a simple automated testing script for the examples folder
most examples now run under python 3
many python 3 fixes, mostly removing dict.has_key
python 3 bug fixed