Fix hostmask generation for hostnames without dots.