Some children are being held for over a month in sub-standard conditions, including in Dilley, Texas, the judge said.