Fixing thumbnail directory lookup.