[python] fix null pointer dereference when invoking non-addon scripts

As noted by @fritsch in https://github.com/xbmc/xbmc/commit/8772221e24b8f2651dd6fdc19bea53555e5b1d9b