Convert item['slug'] into string before concatenating it with ancestor path.

Fixes #588