Why do you need to move the scripts? I ask because creating a symbolic link in the old location, then running the script using this symlink, will preserve the $0. That is a possible solution if you don't need to wipe out the old path entirely, or something similar that will prevent you from making the symlinks.