Worcestershire captain Brett D'Oliveira rescued the Pears with the bat after falling to 10-4 on the opening day of their Vitality County Championship clash with Essex.