build-sdk.sh: Fix ESDKPATH. Error handling, print environment settings