Update tools.mk to 0.5.2 to fix a couple bugs