Clean up `TMP_DIR`
The script doesn't delete the
TMP_DIR when it completes, either successfully or when it aborts due to a gitref mismatch. If a runner is re-used for a subsequent build, it will fail due to
TMP_DIR already existing.
TMP_DIRname and create as a subdirectory of current
Introduce cleanup function to remove
- Call cleanup function before early exits and script completion