init-env: Fix compatibility with zsh and python3
- Fix one remaining compatibility error for Python
- Fix compatibility with the Z-Shell (zsh), which is a popular alternative for the widespread bash. Some distros even use it as default nowadays. Using our scripts with zsh revealed some bugs and compatibility issues that were fixed here.
- Fix error handling in case init-env is executed and not sourced