Perl fixes in ldirectord executable