Made append of trailing slash configurable