Your quoting of "$0" does not protect it from the shell. An attacker need only provide an input such as: /tmp"; rm -rf /; "
Not true.
$ sh -c 'ls "$0"' '/tmp"; rm -rf /; "'
ls: cannot access /tmp"; rm -rf /; ": No such file or directory
If you were right, there would be no reasonable way to write shell scripts.