The desktop background is controlled by the options supplied with this command:
defaults write com.apple.desktop Background
which is at the heart of the script. Basically, it sets up the option for that across all 'spaces'. However, it works even if you have only one space.
I note that some people have tried removing the com.apple.systempreferences.plist with temporary success. That suggests to me that you're all running some other 3rd party software (possibly the same one, but not necessarily) that is corrupting the plist file or resetting the Background option.
The trick is to find out what is doing that. It's likely to be some utility like MacKeeper or some hidden process you've set up that is running on a schedule. Pathfinder can also cause problems with deskop background settings under certain conditions.
You need to go through a process of elimination to find out where the problem lies. Start with getting some useful system info by using this free little diagnostic tool written by etrosoft, another ASC member:
http://www.etresoft.com/etrecheck
Post the results here if you're not sure what you're looking at, and I or someone else will try to take you through the steps of what to do next.