<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean_slug_dir(root):
 """ Given a path, delete anything specified in .slugignore. """

    if not root.endswith('/'):
        root += '/'
    for pattern in get_slugignores(root):
        print("pattern", pattern)
        remove_pattern(root, pattern)