added compatibility for python2
modified .gitignore for build dir