Change getRealPath use to support Tomcat 8