initial port of walletbackup.sh to python

@mrbandrews PTAL.