PTFM-7492: fixed some of the handling of DNAnexus links and added a test