Python3 compliant chmod call
Python3 fixes
Merge pull request #32 from alexcouper/master

Python3 compat