Add OSX support to runtests.sh. Catch errors when md5 files are empty.