frontend: Fix profile import with trailing path slash

The directory chooser can return a path that ends with a separator,
e.g. when the path is typed manually or on some platform dialogs.
std::filesystem::path::filename() returns an empty string for such a
path, so the imported profile gets an empty directory name and its
files are copied directly into the profiles root instead of a new
profile directory. No new profile appears in the profile list.

Normalize the selected path with QDir::cleanPath() before building the
filesystem path, which strips the trailing separator and yields the
actual directory name.
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f