Extract standalone path expansion to do it only once

When using the `--standalone` options to create a setup file, each path is expanded in its own inside the setup file.

But the `path` prefix is already expanded, so that expansion is unnecessary.