[PATCH 3/4] Ensure hookdir exists before creating eject script