Checks directory for bad filenames.