Make sure a default project name is set.

If a project name is not provided by the user, use the folder name instead to prevent errors.