fix issue #50
fix issue #50
add tests for local redirects
Run code formatter
Fix test case to not shadow variables
Redo layout of splitURI code

Cosmetic changes only
Merge branch 'fix-absolute-urls'

Closes #50. Thanks to Alexey Smirnov for his contribution.