I've been playing with the MusicBrainz server in Mac OS X (10.6), and I found that I had to change the use of "head --bytes" in MBImport.pl because BSD's head utility apparently doesn't support --bytes.
I changed it to use dd instead, which I hope is more portable.
Your patch isn't actually correct, because $cat_cmd could be gunzip, and you're patch assumes that $tar is uncompressed (as it passes it straight to dd). I've used the -c flag to head, which I believe is present in OS X.