use lipo tool from the iOS toolchain for arm64
use Pathname.mkpath instead of mkdir because of intermediate directories