Fix use of basestring.
Add .gitignore file to ignore .pyc files.