Modifed chmod to use the correct permissions token

In Python 2 this was just an integer like in Unix/Linux.  In Python 3
it needs to be one of the choices in the stat package, so it has now
been changed to be that.