Fix issue where check for final slash was comparing zero-based index with length
Fix for some invalid url handling; in this instance, the utility class is not doing the same thing the replaced line is doing.
Merge pull request #60 from jnoring/master

Two bugfixes