fix check for clean working copy
Merge branch 'osx' into osx-osx