10.6 compatibility

Will run on Snow Leopard and fix the check shell script.