improve buildrepo.pl (indirs can now end in a /)