utils: tar: use entry to access directory

hopefully it will make coverity happier.

Change-Id: I9290b08763ea4772ec395deb4297f96a119fd5bf
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>