Improve regex for valid filenames.

- Include max length, so don't need to check again.
- Exclude DEL (0x7F) control character.
More comprehensive tests for filename checks.

- Add check for DEL (0x7F) character.
- Add sanity check for filename exactly at max length.