Apply good practices to make SS apps require'able/callable and forkable.

Improve testability by using OS assigned port.
Fix two globals leak (detected by mocha).
Add a three tests test suite.
Provide a way to pass actual app current directory;
don't assume our cwd is the right one.
Modify package.json to run mocha on tests.