contrib/subtree: better error handling for 'subtree add'