Fixes #48

Tried my hand at fixing issue #48. As far as I can tell it should work.

I think the use of strtolower means we can use <code>strstr()</code> instead of <code>stristr()</code>, if desired.

I'm unclear why the extra spaces are added in the comparisons. Can someone explain that to me? (IRC is fine. :) 

Note: UrlTest::testReturnsUrlIfAbsolute was failing at the time I merged from upstream - and still is. I have not investigated how to fix it yet.