[Build] Update genbuild.sh script
[Build] Update genbuild.sh script

- Fix git's rev-list call
- Add proper copyright headers from upstream
- Check that the script is in the git tree

Darknet-Crypto/Darknet,npccoin/npccoin,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Mrs-X/Darknet,benzmuircroft/REWIRE.io,benzmuircroft/REWIRE.io,PIVX-Project/PIVX,Darknet-Crypto/Darknet,npccoin/npccoin,benzmuircroft/REWIRE.io,benzmuircroft/REWIRE.io,benzmuircroft/REWIRE.io,Mrs-X/Darknet,Mrs-X/PIVX,npccoin/npccoin,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Mrs-X/PIVX,Mrs-X/Darknet,Mrs-X/Darknet,PIVX-Project/PIVX,npccoin/npccoin,benzmuircroft/REWIRE.io,npccoin/npccoin,PIVX-Project/PIVX,Mrs-X/PIVX,npccoin/npccoin,Mrs-X/PIVX,PIVX-Project/PIVX,Mrs-X/Darknet,PIVX-Project/PIVX,Darknet-Crypto/Darknet,PIVX-Project/PIVX,Mrs-X/Darknet,PIVX-Project/PIVX,Mrs-X/PIVX,Mrs-X/PIVX,Darknet-Crypto/Darknet