State troopers, misled by false court order, detained school principal for mental health check