Good, I'm glad its working.
You should be able to see the command line that is being assembled by the Applescript by looking at the Event Log in Applescript Editor, or inserting a
to show the value of the string.
(
Script Debugger is, of course, excellent).