Fixed some issues in jsrouting

Removal of werkzeug.templates had left some JS broken
Python 3 compatibility
Merge pull request #579 from pferreir/fix-jsrouting-issues

Fix jsrouting issues
Fix regression in tbtools re Python 3

Introduced in 4381d6eff5e84f09d5f48d1ed79a3533c9030726
Merge branch 'tbtools_regression' into 0.9-maintenance

Fix #578
Merge branch '0.9-maintenance'

Conflicts:
	tests/test_debug.py