Handy python functions to execute external shell commands.