General Motors Co ( GM.N ) narrowly avoided having to shut down some or all of its **rth American plants because of the failure of a small Massachusetts parts supplier when a U.S. Bankruptcy Court judge ruled on Wednesday that GM could retrieve the tooling and finished parts from the supplier, Clark-Cutler-McDermott, a court hearing showed