scripts: mkhash fix return code handling