Fix XDG user dirs regressions from commits 8159d2374 and da87a41ce

Add the missing import for GLib, and fix the subtle change in subdirectories:
~/.cache/pitivi/pitivi/ was used instead of ~/.cache/pitivi/
and ~/.config/ was used instead of ~/.config/pitivi/
previewers: Kill copy-pasted code