O’Brien plans to appeal firing to the SJC