Mer 2884 add unit tests

Adds some tests as well as a slightly modified run_tests.[sh | py] from nupic


@scottpurdy @chetan51 review
Do we really need this file and `run_tests.sh`? Is it required for Travis or something? If we can rely on just the unittest convention of having tests in `tests`, I'd prefer to keep it simple that way.