Working OS X version; just install coreutils and gnu-sed