Fix subdomains with same name as path

Previously, if you had a test url like:

```
  http://heroku.intercom.dev/heroku
```

`Check#url` would change it to:

```
  http://.intercom.dev
```

as it just substituted the path for an empty string in order to get the url. This pull request makes it a bit smarter and fixes the bug. In this case `Check#url` would now return:

```
  http://heroku.intercom.dev
```

PR includes test + fix.