Avoid calling 'set_permissions' if the mode is ok
Avoid calling 'set_permissions' if the mode is ok

Fixes #1638

rust-lang/rustup,nodakai/rustup.rs,rust-lang/rustup,rust-lang/rustup,nodakai/rustup.rs,nodakai/rustup.rs,inejge/rustup.rs,nodakai/rustup.rs,rust-lang/rustup,inejge/rustup.rs,rust-lang/rustup,inejge/rustup.rs,nodakai/rustup.rs,inejge/rustup.rs,inejge/rustup.rs