Resolve a glob pattern into a filelist

def resolve_pattern(pattern):
    '''Resolve a glob pattern into a filelist'''
    if os.path.exists(pattern) and os.path.isdir(pattern):
        pattern = os.path.join(pattern, '**/*.bench.py')
    return recursive_glob(pattern)