Middleborough is taking Gov. Maura Healey's administration to court over the controversial MBTA Communities Act.