Expand hostname before passing it to NewRegistry()

Signed-off-by: Daniel Menet <membership@sontags.ch>