Improve coverage of docker_registry.lib.layers module.

I misunderstood that piece of code, I've updated the PR.