Move into test dir before leaving generated files related to testing and add the entire build subtree to .gitignore.
Ignore all *.pyc files.