Added local command support

The new function "local" executes a local command supporting user
change via sudo.