pylib: Fix the error while doing remote file operation (#12433)
pylib: Fix the error while doing remote file operation (#12433)

follow up #10853 and #11530

I get this error when using gpexpand:

```
20210809:17:39:37:140129 gpexpand:fluorite:sa-[DEBUG]:-Running Command:  python -c "import os, pickle; print(pickle.dumps(os.path.isdir('~/share/packages/archive')))"
20210809:17:39:37:140129 gpexpand:fluorite:sa-[DEBUG]:-Ending CheckRemoteDir
20210809:17:39:37:140129 gpexpand:fluorite:sa-[DEBUG]:-Ending SyncPackages
20210809:17:39:37:140129 gpexpand:fluorite:sa-[ERROR]:-unpickling stack underflow
Traceback (most recent call last):
  File "~/lib/python3/gppylib/commands/base.py", line 277, in run
    self.cmd.run()
  File "~/lib/python/gppylib/operations/__init__.py", line 53, in run
    self.ret = self.execute()
  File "~/lib/python/gppylib/operations/package.py", line 1000, in execute
    if not CheckRemoteDir(GPPKG_ARCHIVE_PATH, self.host).run():
  File "~/lib/python/gppylib/operations/__init__.py", line 53, in run
    self.ret = self.execute()
  File "~/lib/python/gppylib/operations/unix.py", line 46, in execute
    return pickle.loads(cmd.get_results().stdout)
_pickle.UnpicklingError: unpickling stack underflow
```

In py2 print with bytes will write binary data to stdout, but in py3 will write in human-readable format (`b'\x80\x04\x88.'`)

tested by

```
python -c "import os, sys, pickle; sys.stdout.buffer.write(pickle.dumps(os.path.isdir('/home/sa/GPDB/install/share/packages/archive')))" | python -c "import sys, pickle; print(pickle.loads(sys.stdin.buffer.read()))"
```
lisakowen/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,50wu/gpdb,50wu/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb