Merge pull request #5 from compete/master

Fixed a bug with relative redirects and added unit tests