If it appears by a certificate, or reference in case the certificate is not produced under section 465 of this title, that any such liens exist, the court shall appoint a referee to ascertain what amount remains due thereon or secured thereby, respectively, and the order of priority in which they are entitled to be paid out of the property.