Update cgi.c

Discard extra headers from CGI, add O_BINARY flag to all fd-es for CGI.