Fixed several bugs in python scripts.
Merge branch 'develop' of github.com:smackers/smack into develop