Fixed permissions error and made permissions a settable variable.

Permissions were being set by a string, not an octal integer. I.E:
Using '0755' in mkdir renders the permissions as d-wxr----t
Using 0755 in mkdir renders the permissions as drwxr-xr-x

Also, made it a variable so that it can be set in the components config.