Improve determination of image tag names
Tag names can now be correctly determined if the image uses a path. E.g. some.registry.example/namespace/image:tag.
Furthermore, underscores in the generated name have been replaced with dashes to follow the convention of official images on Docker Hub.