security: chown images to uid 0, gid 0 when creating and check ids when reading

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
test: security: test that non-root can't restore images with wrong ids

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>