Added --with-sudoinstall option and made buildmodes work a little better