US bakery group Flowers Foods has posted rising first-half profits as sales rose amid prices hikes and a change in range mix.