Fix permissions check in script

edi.pl was checking an irrelevant permission