Sanity complains about variables being inside quotes.

Yes, the script works as expected with the variables inside the quotes. I haven't tried it the other way.