Added a test for the path handling and found a bug