use smart_text to support unicode data when executing check_permissions.py

Add unicode support when executing check_permissions.py