I have a script that creates two groups, a hand full of folders, and sets permissions on those folders. In my testing environment all of these processes work without issue b
Set the permission on the SID of the new group instead of it's name/samaccountname.