root2hdf5: create tree2hdf5 function and add --ignore-exception option