so your script lists finished torrents and asks a user if he wants them removed. It has some flaws. It is run interactively and most people run transmission-daemon with username/password protection.
My script is meant to be used interactively, e.g. via ssh.
I only use it to remove the torrents, not the files as you do (--remove-and-delete).
Only flaw i see is missing -n user:pw to CMD.
I did not add user/pw because i run transmissiond safely behind my firewall so i dont have to login in when i open the web interface from my lan.
If you need authentication just add "-n USER:PW" to CMD