[PATCH 2/7] util: extract virHookCheckDir from virHookCheck