This worked for me, too. I ran
sudo fs_usage -w -f filesys osascript
in one terminal window, and then ran my applescript command (in my case it was for the odrive file sync setup program)
echo 'open location "http://www.odrive.com"' | osascript
in another terminal window. I looked at the output in the first window and sure enough, a random component was mentioned several times. Using the path listed, I deleted
~/Library/Audio/Plug-Ins/Components/Guitar Rig 5.component
and then everything worked. Thanks so much for the detailed troubleshooting instructions!