Fix crash on invalide resource URI

The code was expecting a resource URI to contain a slash. This fix
adds a test for this and returns a proper fault if the slash is missing.

Reported by George varghese