Fix rights based on roles for new folders.

Without this fix, role rights of new folders were set as read only no matter if the parent has R or W.