Port of walletbackup.sh to Python.
Merge pull request #5427

1577df9 Port of walletbackup.sh to Python. (mrbandrews)