Null-terminate the output of popen(). Fixes #186.