improve sudo install support

on some Linux environments, it appears that GEM_HOME is writable but
some (or all) subdirectories are not writable. by using sudo anytime one
of those subdirectories is not writable, it becomes possible to run
`bundle install` without special considerations on those machines.

fixes #2403