[build-script-helper] Avoid capturing stderr in path
[build-script-helper] Avoid capturing stderr in path

When asking swiftpm for a path, don't include stderr, which could
include warning messages.

rdar://71605815

apple/swift-syntax,apple/swift-syntax,apple/swift-syntax