One tip, if you do the "click-drag" movement from the center of a unit along it's long axis, you can get a few steps of strafing movement before the unit starts to turn. i.e. if you want to slightly reposition the unit, click-drag from the center left or right, then when they get where you want them, shift-click them the direction you want them to face. This will override any movement command and voila, you shifted the unit left or right without exposing any flanks.
This also works great for moving a unit backwards who is exposed in your lines. Wait until the enemy volleys, then fit fallback; right when they get where you want them, shift-click or hit spacebar and this will cancel the fallback.
That said, I still have had many times where units do some crazy swirly "WTH were you thinking" movement that ends with them routing from flanking and rear fire. Sometimes it's really hard to avoid.