[automated-commits] Make sure BUILD_DIR exists and is exported
Summary: This makes it simpler/easier to build binaries. It's not used anywhere but the smoke tests yet, but will be (see stack).
Test Plan: COMMIT_TYPE=update-chainparams ./automated-commits.sh
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5331