Cartridge Bash SDK cleanups

Use locals whenever possible. Remove undesirable/unused functions.
Merge pull request #1937 from ironcladlou/dev/v2carts/sdk

Merged by openshift-bot