Refactored calls to lipo_to_tempfile to always check the return value explicitly, and return the error codes on failures so that they propagate to calling code.