Empty out the image directory.

def clear_dir(path):
    """Empty out the image directory."""
    for f in os.listdir(path):
        f_path = os.path.join(path, f)
        if os.path.isfile(f_path) or os.path.islink(f_path):
            os.unlink(f_path)