COOK-3271 Fixes chef client/solo homedir problems with sudo on rehl systems

I was able to reproduce and fix the problem with runit when it was run with sudo chef-client/solo.

The problem was related to the fact that in some cases ( first runs with sudo )

rpm_root_dir=`rpm --eval "%{_rpmdir}"`

was evaluated at the wrong time, before the run /usr/bin/rpmdev-setuptree inside of build.sh file in the archive. That would cause rpm not found errors during runs prefixed with sudo.

Provided fix should solve problem for all chef runs with sudo as well as those which run as part of the init process on boot.