Fixed invalid dir extraction

Earlier every file entry in zip assumed to be a file entry, which caused
invalid extraction of directories, now the flag is checked

TODO: should actually process more information from entry (flags, creation time and
so on)