Convert slashes to dashes when creating an id for a view from its path.

...is also allows ids to be used for compiling views.