A Londonderry couple appeared in court after a “bizarre” decision to climb a security fence to visit a relative’s grave.