lib/commit: minor coverity fix
lib/commit: minor coverity fix

Appease Coverity by using the same condition for both the ternary check
and the if-condition later on. It should be smart enough to figure out
that `dir_enum == NULL` implies that `dfd_iter != NULL` from the
assertion at the top of the function.

Coverity CID: #1457318

Closes: #1250
Approved by: cgwalters

GNOME/ostree,GNOME/ostree,GNOME/ostree,GNOME/ostree,GNOME/ostree