Restricting users because the software is buggy sounds like the wrong way to solve the problem.
Not to mention the error handling:
Any attempt to create a file name that fails the tests will be rejected with an EPERM error
So the user will get a "permission denied" error when trying to save a file instead of "the file name contained invalid characters, which are...".