Portable usage of subprocess w/ python3 and python2.6 fixes.