use html5mode for paths.

Fix some code that was not ready for paths correctly.