I find the following resources most helpful when things get
confusing:
Technical Note TN2065 - do shell script in AppleScript
http://developer.apple.com/technotes/tn2002/tn2065.html
Pertinent answered Q's:
Q: My command doesn't work right when a parameter has spaces or
certain punctuation — parentheses, $, *, etc.
Q: I need to put double quotes and backslashes in my shell
command, but AppleScript gives me a syntax error when I try.
Q: I have an AppleScript file or alias object; how do I pass it
to a shell command?
Q: POSIX path doesn't work right if the file has certain
characters in its name — spaces, parentheses, $, *, etc.
GNU Bash Reference Manual
http://www.network-theory.co.uk/docs/bashref/index.html
(In particular, section 3.1.2 Quoting, and section 3.5 Shell
Expansion)