Added functionality to screen out illegal characters from file names.