Dirk Nowitzki scored 31 points, including the Mavericks' final eight, and pulled in nine rebounds in a win over Phoenix