I noticed that ‘md5sum’ on debianubuntu includes two spaces between the hash and the filename. On my Leopard mac, ‘md5 -r’ has only one space between the columns.

So look out if your script parses the output of md5 in a way that relies on that second space being present. In that case you should update your script to compensate, or otherwise somehow get the mac to include an additional space.