Added a check for error code returned from the request.get function. Otherwise when there is a connection error there is a problem with request.statusCode as request is null.
Added fix for the memory leak and a test example from a discussion about the issue.
Merge pull request #22 from seanowenhayes/master

Check for connection error in main.
jsdom 1.0 parentWindow instead of createWindow()
Merge pull request #26 from chmac/patch-1

jsdom 1.0 parentWindow instead of createWindow()
Enable passing `state` from spider.get to any matching route handlers.
gitignore node_modules
Route handlers have this.url set to the request's URL