Changed the base class for tests to avoid using the deprecated class
Fixed the deletion of cookie on Windows in some cases

When the current url is returned as /foo.php, dirname will return \ on
windows instead of / and the removal of the cookie will then fail.