add tests for trailing slashes and malformed URLs
trim whitespace for good measure