Fixed behaviour in case the tail start with a slash

If the variable tail contains a value like "/root" it would be impossible to access the WebService. This fixes the behaviour, making it work in both cases ("root" or "/root")