[#46859261] fix release script

- fix gem version confusion due to gem loading
- fix SDTIN.gets call
- refactor tasks
- built in more security measures