The self-update shell script ran mkdir -p $BIN_DIR without checking the result, so a silently failed directory creation led to the empty path error later in the install step. Make the script stop as soon as mkdir fails and print the directory name in the message.