Support route globbing

Support route globbing in js-routes as in rails. Also fixed typeof problem, little cleanup of js.