forceTrailingSlash = function(path) {
    // Check the name ends with a /
    if (path.slice(-1) !== "/") {
        path += "/"; // IE doesn't like substr(-1)
    }
    return path;
}
Returns the path with a slash at the end.
@private
@param {String} path the path to check.
@return {String} the path with a trailing slash.