Handle bug in bash 4.2 with tilde expansion

Pattern substituion in bash 4.2 was faulty, which caused tilde to not be
expanded in certain cases. This behaviour was previously relied on, now
we are only using that behaviour as a fallback on bash 4.2.

This resolves issue #289
Enable support for Software Collections

Fedora, RHEL, and CentOS provide support for multiple versions of
the same software components using Software Collections.  This
patch lists the active collections in a similar manner to Python
virtualenvs.
From #291: fix $TERM check

Thanks to Daniel Serodio (@dserodio) for the catch.
Simplified unwanted tilde expansion handling

The idea comes from https://github.com/edkolev/promptline.vim/pull/11