If there’s a strange person trying to break into your house, the intricacies of the law are probably the last thing on your mind. But any steps you take could throw you into a legal minefield.