Refactor RefResolver a bit to fix #102
Add referrer attribute back to RefResolver
Change test to work around issue with urlparse
Merge pull request #103 from gazpachoking/local_ref_refactor

Refactor RefResolver a bit to fix #102