Allow build dir to be set via environment variables. Fixes an issue with magento connect installs.