':param directory: The directory from which profiles are loaded
:return: Two different lists:
- One that contains the instances of the valid profiles that were
loaded
- One with the file names of the profiles that are invalid
>>> HOME_DIR = \'.\'
>>> p = CoreProfiles(None)
>>> valid, invalid = p.get_profile_list(HOME_DIR)
>>> valid_lower = [prof.get_name().lower() for prof in valid]
>>> \'owasp_top10\' in valid_lower
True'

def get_profile_list(self, directory=HOME_DIR):

    profile_home = os.path.join(directory, 'profiles')
    str_profile_list = get_file_list(profile_home, extension=profile.EXTENSION)
    instance_list = []
    invalid_profiles = []
    for profile_name in str_profile_list:
        profile_filename = os.path.join(profile_home, (profile_name + profile.EXTENSION))
        try:
            profile_instance = profile(profile_filename)
        except BaseFrameworkException:
            invalid_profiles.append(profile_filename)
        else:
            instance_list.append(profile_instance)
    return (instance_list, invalid_profiles)
