osascript to set secondary desktop background?
Quick Google search revealed the following code:

set tlst to {}
--set newtop to (path to home folder as string) &amp; "Pictures:desktop pics folder:BigDipper 916.jpg" as alias -- sample line
set newtop to choose file


tell application "System Events"
   set tlst to a reference to every desktop
   --set picture of item 1 of tlst to newtop -- display 1
   set picture of item 2 of tlst to newtop -- display 2
end tell


Taken from

http://macscripter.net/viewtopic.php?id=35840

I don't have a second monitor so I cannot test it. 

Hope it helps.