Lancashire raised hopes of escaping relegation from Vitality County Championship Division One as bowlers Tom Bailey and Anderson Phillip shone against Worcestershire.