(1) All conveyances, obligations conditioned or defeasible, bills of sale or other instruments of writing conveying or selling property, either real or personal, for the purpose or with the intention of securing the payment of money, whether such instrument be from the debtor to the creditor or from the debtor to some third person in trust for the creditor, shall be deemed and held mortgages, and shall be subject to the same rules of foreclosure and to the same regulations, restraints and forms as are prescribed in relation to mortgages.
(2) Provided, however, that no such conveyance shall be deemed or held to be a mortgage, as against a bona fide purchaser or mortgagee, for value without notice, holding under the grantee.