zip: handle directories in zip generation