Upon receiving from the coroner money found on a dead body, the treasurer shall place it to the credit of the county. The money shall be credited to a separate trust fund or trust account. If the legal representatives of the decedent demand the money in the treasury belonging to the decedent within six years, the treasurer shall pay it to them, after deducting the fees and expenses of the coroner and of the county in relation to the matter, or the money may be paid at any time thereafter upon the order of the board of supervisors.