console: fix namespace problems when using slapos console with scripts
When using slapos console on scripts defining functions, for example
```py
def my_request(*args, **kw):
...
return request(*args, **kw)
```
the global names such as `request` where no longer available in the
namespace of the function, because of a wrong usage of exec regarding
locals/globals.
Co-authored-by: Kirill Smelkov <kirr@nexedi.com>