Make sure relative URLs are preserved

Add tests to make sure we don't break relative URLs again.
Extracted common html flags and common extensions for easy access from
tests.

Closes issue #104, which was fixed as a side effect of cf6bfc9.
Convert silly funcs to consts
Merge pull request #118 from rtfb/test-relative-links

Make sure relative URLs are preserved