Added a flag 'recursive' to change permissions in the whole subtree. Patch by scabrero