Johnny Depp tells court he wanted to give Jack Sparrow a 'proper goodbye'