Fix #963 by removing non-valid characters from names to create usernames.