Give this one a look. I incorporated what Steven was getting at and some techniques I was trying to get across. It still uses the initial sweep trajectory, but the sections were built on the vertices of the sweep trajectory. 4 guide curves create the corners that are used in the blend sections.
Relations are built into the last 3 sections to make sure they act together. The section in the 5th_sketch group manages the transition from rectangular to round as well as the angles of the section in the 6th_sketch group to a lesser extent.
The attached model should give you some level of flexibility to get the shape just how you want or need it to be.
Again, Creo 2.0 full version attached.