Changes to handling of tmpdir & related variables

RPM specfile housecleaning is part of this pull request, but can largely be ignored for those not interested.