A case was brought against Scottish Borders Council which had installed only gender neutral toilets in a replacement school.