[python] fix scripts run directly that aren't an add-on. fixes #14265

@jimfcarroll I think this is fine as is.  It happens where the user (or a script) calls RunScript(/path/to/some/script.py), where we therefore don't have an add-on object.