ref(builder): use bash-style substitution

This is already in use at check-repos, which is a fancier way of
stripping the file extension from a string.
fix(deisctl): properly resolve ~ in path

While `$HOME` is resolved properly in paths, `~` is not
and requires special handling.

I tested this with the following, on both bash and zsh:
```console
$ deisctl config platform set sshPrivateKey=$HOME/.ssh/deis
$ deisctl config platform set sshPrivateKey=~/.ssh/deis
$ deisctl config platform set sshPrivateKey=/Users/carmstrong/.ssh/deis
$ DEISCTL_UNITS=/Users/carmstrong/gocode/src/github.com/deis/deis/deisctl/units deisctl refresh-units
$ DEISCTL_UNITS=$HOME/gocode/src/github.com/deis/deis/deisctl/units deisctl refresh-units
$ DEISCTL_UNITS=~/gocode/src/github.com/deis/deis/deisctl/units deisctl refresh-units
```

fixes #2677
tests(utils): add unit tests for utils package
Merge pull request #2752 from carmstrong/fix-deisctl_tilde

fix(deisctl): properly resolve ~ in path
Merge pull request #2749 from bacongobbler/the-power-of-bash

ref(builder): use bash-style substitution