Captain Dimuth Karunaratne posted his ninth Test hundred as he scored 122 in a key opening partnership of 161 runs with Lahiru Thirimanne, who made 64, as Sri Lanka collected their first points of the World Test Championship.