Adds conditionals for the trailing slash