Return empty string instead of null for empty paths.

This will keep the `d` attribute from getting removed from `path`
elements when the data is empty.

Closes #1737