Added .gitignore.
Updated source code to work on Python 3.2.