Added .decode() to piped output from Popen for Python 3 compatibility.