Fix buildHuffman, changing it to work in ascending order.