Support installing substance-io as a binary called 'io'.

Fixed npm dependency issues on the way.
Factored out variable for controlling base library directory.

Now we assume by default that substance-io is started in a docs repository.
Add missing dependency.
Fix regression.
Make static routes relative to install dir or cwd, respectively.