Fix installation chmod issue

If installation is performed without the executable for chmod being on the PATH (not outside
of the realms of possibility), the current installation fails. To correct, use the Python os.chmod function.

In my case this happens because the installs are done as an unprivileged user which doesn't have /bin on its `PATH`.