Followup of #2172891: Validate allowed characters on project's machine name. This one needs a test. I haven't provided one with the original issue, since most tests in project.module are commented out (as a result of D7 upgrade I assume)