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

also fixed typo