Capture exit status of cgi scripts