Add URIUtils::HasExtension(..)

A common use case for URIUtils::GetExtension(..) is to see what extensions the file has. So i added a function 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(..)