ar_to_bc.sh: replace readlink -f with custom relative path resolution
llvm-ar is a crunchgen-style executable dispatching to dlltool,ranlib,lib,ar based on argv.
In our content-addressable storage, readlink -f resolves paths to some
digest and thus lost the original "llvm-ar" filename.
Replace it with a custom path resolution to fix the problem.