Fix package installation when with_sudo => true