fixed exception handling
improved rejection of bogus directory entries