further refinement to EISDIR tests from `perl dir`

1. actually use the EISDIR string, rather than getting it and
   not using it; this was a refactoring screw-up

2. don't hardcode the Win32 EACCES error, either, use the same
   "$!" mechanism