Add copyright notice to scripts and make Linux scripts more portable