[python] fix scripts run directly that aren't an add-on. fixes #14265
Merge pull request #4382 from jmarshallnz/fix_non_addon_scripts

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