use more idiomatic bash code
implement purify in pure bash for speed
Merge pull request #415 from ap/harder-faster-bash

Speed up bashrc startup