A main route through a west Dorset town is closed for emergency repairs