The answer of a garnishee in any execution attachment, at the option of the plaintiff therein, may be taken by affidavit before any person legally authorized to administer oaths. When so taken and filed with the writ of attachment it shall be docketed in the same manner and have the same effect as if taken in open court. The garnishee's mileage, in such cases, shall be counted from the garnishee's residence to the office of the person taking the garnishee's affidavit, and endorsed thereon.