Takes into account prepended slash in url. Fixes https://github.com/puphpet/puphpet/issues/964