Section 17. In an action under this chapter to establish paternity of a child born out of wedlock, the court shall, on motion of a party and upon a proper showing except as provided in this section, order the mother, the child and the putative father to submit to one or more genetic marker tests of a type generally acknowledged as reliable and performed by a laboratory approved by an accreditation body designated by the federal Secretary of Health and Human Services pursuant to Title IV, Part D of the Social Security Act. An affidavit by the mother or the putative father alleging that sexual intercourse between the mother and the putative father occurred during the probable period of conception shall be sufficient to establish a proper showing. If during the probable period of conception, the mother was married to someone other than the putative father, the court may order genetic marker tests only after notice pursuant to subsection (c) of section 6 to the spouse or former spouse. The court or the IV–D agency as provided in section 3A of chapter 119A may, order any person properly made a party under this chapter to submit to such testing. Unless a party objects in writing to the test results upon notice of the hearing date or within thirty days prior to the hearing, whichever is shorter, the report of the results of genetic marker tests, including a statistical probability of the putative father's paternity based upon such tests, shall be admissible in evidence without the need for laying a foundation or other proof of authenticity or accuracy; provided, further, that such report shall not be considered as evidence of the occurrence of intercourse between the mother and the putative father; and provided, however, that such report shall not be admissible absent sufficient evidence of intercourse between the mother and the putative father during the period of probable conception. If such report indicates a statistical probability of paternity of ninety-seven percent or greater, there shall be a rebuttable presumption that the putative father is the father of such child and, upon motion of any party or on its own motion, the court shall issue a temporary order of support. If the report of the results of genetic marker tests or an expert's analysis of inherited characteristics is disputed, the court may then order that an additional test be made at the same laboratory or different laboratory at the expense of the party requesting additional testing. Verified documentation of the chain of custody of genetic marker or other specimens is competent evidence to establish such chain of custody. The fact that any party refuses to submit to a genetic marker test shall be admissible and the court may draw an adverse inference from such refusal. The cost of making any tests ordered pursuant to this section shall, in the first instance, be chargeable against the party making the motion. The court in its discretion may order the costs of such testing to be apportioned among the parties provided, however, the court may not direct the IV–D agency as set forth in chapter 119A to pay for such tests, unless said IV–D agency is the moving party and provided further, that if the putative father is found to be the father, the court shall order the putative father to reimburse the IV–D agency or the other party. Payment for the costs of such tests shall be considered a necessary expense and if any party chargeable with the costs of the genetic marker tests is indigent as provided in section twenty-seven A of chapter two hundred and sixty-one, the court may direct payment of such costs by the commonwealth regardless of the type of tests requested by the moving party.