quote the path names
Use the xattr trick
Finish the script

Now I just need to test it.
Make sure the xml file exists