Use QFileInfo::completeBaseName instead of baseName
This makes it possible for users to use dots in their filenames.
Not that that is a good idea, everything after the first dot is
technically an extensions, as in bla.tar.gz, but Krita doesn't
handle any file formats where that actually happens, so we can
be a bit less technically correct when handling filenames and
only check the extension after the last dot.
BUG:409765