Fix error handling in backup cursor open.

Without this change test_backup03 hangs occasionally, with this change it
reports an error instead.