Add proper cleanup to InternalSettingsPerparerTests