md5-check function, works on Mac and Linux