‘Attacking the bargaining system’: NSW government slammed after 11th-hour bid to stop rail strike hits court