Fix for coverity (should use zu for sizeof)
Fix for coverity (don't leak memory in add_rpath_noinstall)
Fix for coverity (don't leak memory if we can't find the library)
Fix for coverity (don't leak memory if the object doesn't exist)
Fix for coverity (fix cleanup_tmp_dir so it doesn't leak directory handles)