Fixed search in files/directories with `%` in the name (fixes #369).