Fix permissions check in check-labels