When responding to a HEAD request, path will be None and path.stat()
will fail. This is my fault, I tried to be a smart ass and rework
a patch from someone else before applying it.
Avoid code duplication by adding a separate dict and update it when it
is a HEAD request.
Fixes: 2850e40638be ("container: fix pull with k8s containerd")
Signed-off-by: Robin Jarry <email@example.com>