Court orders council to rehouse family