Use url to parse req.url, req.pathname is not supported in connect.
Merge pull request #88 from roberttod/rewrite

Use url to parse req.url