redo daa2c94a370f959b9616b4b7fca0b2ef2cad99a2 for bash and zsh

Since I generally want minimum differences for our bash and zsh
scripts, we need to have a branch that depends on $BASH_VERSION
or $ZSH_VERSION to tell us what shell we are in. Because unfornatedly,
the "read" builtin has different parameter for reading parameters
into an array ( "-a" for bash, "-A" for zsh ).
fix the integration with 39096c4e04286d1dd23c2808a3a0ec4b9c89e709

Since 39096c4e04286d1dd23c2808a3a0ec4b9c89e709 we hard-code the
PERLBREW_ROOT at install time, by using sprintf(). So some extra '%s'
in there will break the generated bashrc.
fix another breakage on zsh.

The zshbuiltin "type" does not recognize "-t" parameter.
So we will just need to use the old code.