Fix viewing gallery with non-latin symbols in directory name