Replace glib file/directory handling with equivalent Qt code

I hope this is indeed equivalent...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>