Fix test for files with non ASCII characters
The previous check was to general since it catched also files were non ASCII characters are allowed (e.g. Latex files). Now test only for source code files and check for files which are of non ASCII type.