Fixes sed regular expression flag differences, plus expr number parsing problems by removing whitespace
Check if sed accepts the -r flag, otherwise try -E
Merge pull request #2 from joelpurra/mac-osx-fixes-sed-expr

Mac OSX fixes for `sed` extended regular expressions and and `expr` parsing numbers with whitespace