Added waitFor() call so avoid a race condition between chmod'ing the m2 script and trying to use it. Should impose little or no performance penalty on the bootstrap process.