thumbnail: Don't fail after successfully creating the cache directory

g_mkdir_with_parents returns 0 on success or if the directory already
exists, which caused the code to go into the failure path rather than
generating the thumbnail.

https://bugzilla.gnome.org/show_bug.cgi?id=684026
thumbnail: Include the filename in the thumbnail path

thumbnail_path did not include the actual filename in its result after
calculating it. This breaks things in save_thumbnail which assumes
receiving a file path rather than a directory path.

See original code before clean ups at:
https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-desktop-thumbnail.c?id=f2d25fa7d6cdaba03679f0fc0921fc5f81bd3944#n1060

https://bugzilla.gnome.org/show_bug.cgi?id=684026