pclose(3) error-checking and WEXITSTATUS() OSX compatibility.

OSX's WEXITSTATUS takes the address of its argument, so passing it
a function call expression doesn't work.