(3) Upon the motion of the defendant, prosecutor or person having an interest in a thing detained under subsection (1), a justice may make an order for the examination, testing, inspection or reproduction of any thing detained upon such conditions as are reasonably necessary and directed in the order.