FIX: correctly determine if the ZIP entry is a file or directory.