test_mac_pkg.py: check the return value of the Popen.wait()

Also the pid callitpid is no longer used, so remove it.