Fix link check for paths with spaces