I too had this problem where the security was applying to my files but not folders. Folders would display special security.
I changed *.* to just * within the folder i wished to change. Using /T to made changes to all my subs. Here are my non working and working scripts.
Wrong
C:\test
Icacls *.* /T /C /grant system:F
Working
c:\test
Icacls * /T /C /grant system:F
Hope this helps as it was doing my head in.