Add URIUtils::HasExtension(..)

A common use case for URIUtils::GetExtension(..) is to test for the existance of extensions. So i added functions for that.

* Hopefully a bit cleaner and more efficient
* Switched over as much code that i could find
* Gtest added
* Some extra cleaning in IDirectory::IsAllowed(..)