Port slugify to Python3