Handle path when writing component with directory in epub
add dc:type in metadata and handle resource in subdirectory