fix shell redirection issue with sudo, fixes #42