update some stat scripts to work on Darwin