Karthik urlparse

Working test suite, changed error message to be a little more descriptive.