Gamma rays from neutron star mergers: a unique signature of the r process