getting perl wrapper up to speed

also some small improvments to xdireader.c + squenlched a compilation warning in xdifile