Fixed shebangs, added error checking
Merge pull request #622 from moshekaplan:python2_cleanups