fix #1273333. Don't rollback on cancel

Only rollback the library if we had another problem then canceling the
recursive scan.
save hashes only after we scanned a folder