Fixes to make sudo work in local and remote scenarios
Additional sudo support work
Merge pull request #171 from nhr/sudo_corrections

Fixes to make sudo work in local and remote scenarios