What about special casing `/` in `_nameFromPath`? A little smelly, but it might be the simplest way to let all the existing code keep working.