mad: handle if the script is symlinked

If the called script is a symlink, resolve said symlink to find the
proper install path. Requires readlink(1).