setup.py: python3 compatibility

- Added list( ) to map commands which should return a list
  instead of an iterator
- Replaced string literals in os.write statements with bytes literals
- Added decode() calls to stdour, stderr streams returned by
  Popen.communicate()