A man accused of stalking actress Anna Friel for nearly three years has denied the offence in court.