El Capitan can be really awful - I had all sorts of problems getting Kali to dual boot from USB on my own late 2015 MBP. In the end, I installed rEFInd through Recovery Mode (SIP makes it so ./refind-install can't run in El Cap) - you can find a detailed summary of how to do this by searching "rEFInd El Capitan", but it's simple, just download, unzip, boot into recovery mode, navigate to the correct directory, and run ./refind-install.
After installing rEFInd, I booted into Kali Persistence, and ran the above little script you were trying to. It told me there was no such file, so I downloaded the same version of Kali into my Downloads folder(in Kali) then ran the commands, and it worked fine. Let me know how this worked for you (it's worked like a charm for me so far, whereas using GParted was so annoying).