Update build scripts to work with Python 3, add .gitignore