Better conversion of base URLs to file permissions.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1543223 13f79535-47bb-0310-9956-ffa450edef68
Use local variable since we already have a reference to the
ServletContext

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1543227 13f79535-47bb-0310-9956-ffa450edef68
Clean up

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1543228 13f79535-47bb-0310-9956-ffa450edef68