Pe basic mocha tests

Mocha (unit), Karma (midway), and Protractor (E2E) tests, all working now on Travis.