Judge rules in favor of Michigan Catholic foster care agency