some changes to utils, adding makeTempFile and a test for mac