Add /j/* route, refactor filer-www

I wanted to make it easier to write tests for the server filesystem from the client side.  I've created a new `/j/*` route, which is like the `/p/*` route but returns JSON instead of HTML.

I still want to add some tests for this, but will wait for @sedge to land his lock code, since he's moving tests around.
any reason we dont use var layout = {}