Improve scanning of passwords in file names.

Replace regexes by plain logic to allow "/" and "{{" and "}}” in passwords.