In addition to erlang R16B02, you need a more recent bash
because the scripts use bash associative arrays; a feature which is not present in the version of bash distributed with MacOS X.
brew install node
brew install bash
## put new bash on path
export PATH=/usr/local/bin:$PATH