refactor of pathsToGlob to handle comments and inclusions