Unit tests

Fixes all unit tests in the project

To run unit tests:
source deploy/env/bin/activate
./tools/runtests.py

Also contains a small fix for bash shell colors.
See http://stackoverflow.com/questions/706750/why-is-this-bash-prompt-acting-strangely-disappearing-and-how-do-i-fix-it-os-x