Handle path when writing component with directory in epub