Catch when a users codename contains invalid characters

fixes #548. Catch the error produced when a user specifies a codename containing potentially dangerous characters, and flash that user an informative message.