Fix Windows detection in OSX bash
Fix Windows detection in OSX bash

`expr substr` was being used to cut characters for OS detection but is
not available in BSD/OSX expr. Convert to use `cut` instead.

jaylynch/dotfiles,jaylynch/dotfiles