When a native_packaging command test fails, write its output to a temp file.
Fix compilation problems with Apple Clang 503.0.38 on OS X.