Fix redirect not working for relative paths

Finally used it and discovered that it wasn't actually correctly
redirecting. The tests were wrong and so the module didn't work.

Updated the tests with the correct node API.