Add functions for testing install type. Fixes #216
Fix undefined variable `BS_ECHO_DEBUG`. Replaced tabs with spaces.
The script does not ignore the environment `PACKAGESITE` and also checks for `BS_SALTREPO` in env.
All internal variables are underscore prefixed.