streamlined the removal of trailing and leading slashes for document root and request_uri
streamlined the removal of trailing and leading slashes for document root and request_uri

also fixed typo

SnapSearch/SnapSearch-Client-PHP