Proper relative URL support

Previously, relative URLs were only supported in one direction (further down the tree). This pull request adds full support for the following types of URLS in both links and images both relative to the site root and relative to the current page in either direction:

* `/foo.html`
* `/foo`
* `foo`
* `foo.html`
* `foo/bar#`
* `/foo#`

Todo:

- [x] tests