Add File existence checking (#32208)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32208
### Summary
Since the master branch will generate `libtorch_cpu.a`, which is different from the release branch. This PR will skip the missing libs before archiving them.
### Test Plan
- don't break the nightly build
Test Plan: Imported from OSS
Differential Revision: D19420042
Pulled By: xta0
fbshipit-source-id: fb28df17b7e95d5c7fdf5f3a21bece235d7be17c