Fix crash when /proc/acpi/ac_adapter/ is not present, for instance,
on pre-ACPI and non-Linux systems.

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 7e55f87..43a64b5 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -238,7 +238,8 @@
 			return 1;
 		}
 	}
-	closedir(d);
+	if (d)
+		closedir(d);
 	return 0;
 }