Installer improvements

As per the discussion on the mailing list, this pull request makes the following two improvements to the installer script:
* attempts to preserve http_proxy environment variables when using sudo
* uses subshell ( ) notation to preserve current work directory