Fixes undefined function error.

At the current stable version of NodeJS, http.response.setHeaders doesn't
exist and is replaced with setHeader.
Fixes test cases.

Various test cases had wrong comparison operators and/or small bugs. This
commit patches all the failing test cases.