Fix creation of the report's file name from the mangling of the user name
The directory and file name to store a user's report is produced by
replacing any character but the letters, digits and a few safe
characters from the user name. But that name mangling was not dealing
properly with consecutive invalid characters. The result was, at best,
a truncated file name (without any real consequence) or, at worst, an
invalid character left in the file name.