We prove that if A is a sigma-unital exact C*-algebra of real rank zero, then every state on K_0(A) is induced by a 2-quasitrace on A. This yields a generalisation of Rainones work on pure infiniteness and stable finiteness of crossed products to the non-unital case. It also applies to k-graph algebras associated to row-finite k-graphs with no sources. We show that for any k-graph whose C*-algebra is unital and simple, either every twisted C*-algebra associated to that k-graph is stably finite, or every twisted C*-algebra associated to that k-graph is purely infinite. Finally we provide sufficient and necessary conditions for a unital simple k-graph algebra to be purely infinite in terms of the underlying k-graph.