Then downloading the second URL results in such an error.
But wget should handle this situation, AFAIR there is a test provoking this situation (just can't find it).

The background is that a web server's file names not necessarily represent a file system (e.g. maybe the server looks up the files in a database), while wget uses the filesystem as storage. Sometimes there is no 1:1 mapping.

The final two lines seem to be incorrect, and likely indicate a logic error. (The message should also say what wget was trying to do at the time the error was found.) Indeed, the two items mentioned are directories, but they are directories that wget created, it shouldn't be surprised by them.