Fix autogenerated session_names to contain only valid characters.