moved the BUILD_DIR and TMP_DIR to its own script