fix: let Mac packaging run from a symlinked checkout path

Node resolves import.meta.url through symlinks, so the main-module guard
never matched when the script was started through a symlinked path (for
example a checkout under /tmp on macOS). plan and stamp then exited 0
without output, and Mac packaging failed later with an unrelated-looking
"Unexpected end of JSON input" while reading plugins.json.

Compare the real path of argv[1] instead, and only when it exists:
importers such as the Linux staging tests pass a non-path argv[1].

Fixes #201528