PHP validator that checks if a given string is a valid/allowed filename across operating systems