Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61542 Remainder of fix for CVE-2017-12617 This ensures that a path specified for creation of a file does not end in '/' since that is dropped by the File API.