Corrected errors in passphrase passing in backup script and exit status handling in restore logic