utils/prepare-mode.sh: style fixes.
utils/prepare-mode.sh: use `realpath -m` to resolve package export path.

It may not exist at the invocation time.