Move OS detection to task helpers and add detection of OS X
Make method names clearer in check.rake
Replace all stat command line calls with ruby equivalents