Add a test to break the slugifyPath() with folder and file afterwards

Fix #6722