Reset dock icons while log off
Since you're logging out you can just delete the com.apple.dock.plist file in the script using the rm command and no need to use the killall and defaults commands.  I just tested this with a logout script and it reset the Dock to the default Dock when logging back in.

I used: rm "/Users/$USER/Library/Preferences/com.apple.dock.plist"