Re-fix #934 - setting script permissions across osx and linux.