When 16-year-old Mhairi Julyan was killed, detectives used cutting edge forensics before closing in on Gavin McGuire - a repeat sexual offender.