refactor of pathsToGlob to handle comments, \r\n line endings and inclusions