this is now simpler - the check with `\\` was relevant for windows only because using dirname on '/' returned '\'