Interesting point comes to mind here...
Let's say Mr A, who is a terrorist, sits on a train and traces of explosive are deposited from his clothes onto the seat.
Later on, Mr B sits in the same seat and picks up the traces.
As Mr B leaves the train, he passes through a dogs check. The dogs go crazy and Mr B is detained; forensic examination of his clothes reveals that he is covered with traces of explosives.
How would Mr B prove his innocence?
Strictly speaking it is up to the police and the courts to prove guilt, and not up to Mr B to prove his innocence.
If a sniffer dog reacts to a persons clothing, which is then found to contain traces of explosives, it would seem reasonable for the police to search the persons home and workplace, and to pursue inquiries as to those they have been in contact with.
Traces of explosives MIGHT signify terrorism, but explosives have a number of legal uses in mining, demolition, and for military purposes.
Nitroglycerine is a dangerous explosive and is the active ingredient in a number of patent blasting explosives, it is also used as a heart medicine !
Fireworks are legal if not misused, and of course contain explosives (most fireworks use black powder AKA gun powder, not much used these days for other purposes, but some fireworks use other explosive compounds)
Shotguns have a number of lawful uses, and the shells of course contain explosives.
I have attracted the attention of a police sniffer dog at Paddington after lawfully useing a shotgun on a farm. I was asked to provide proof of identity, and asked if I had handled explosives or fire arms, the police seemed satisfied as to my explanation.