I know this is not very nice. I looked then and now, but I couldn't find a way to ***test if a given path is a subpath of another path*** - thus the hacky workaround with the slashes and `start_with?` in line 176. If you know any better way, let me know.

Otherwise the only thing I could imagine would be to move the regexes and `starts_with?` to its own method, `is_subpath?` or similar.