Check if the path ends with '/' and append it.