disallow trailing dots in file/directory names, rework error messages, remove unused strings