Fix issues and re-enable tests disabled in PR #165983 (from PR #165360) (#166147)
1. Fixed test setup to correctly create .so/.dylib files in the build
directory.
Previously, the build was happening in the source directory using the
same
input parent path.
2. Fixed architecture compatibility check in #166510 .
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>