Make use of GLib's file utilities for doing file tests

Some other minor changes were made and the function file_exists() was removed.
No need to check whether the data storage folder exists; cfgpath already does that for us
Rearranged some variables