Use simpler ~-expanding function instead of wordexp where possible.
Spec for sudo modifiers generation.