Added support to run commands

This commit makes it possible to run commands from lua, eg.:
device.shell.run()

This commit also adds automatic expansion of variables and commands when loading a plugin.