Make .gitignore more robust

Avoid '**/' patterns for compatibility w/ git < 1.8.

Ignore generated test scaffolding files.

Ignore Python build artifacts.