Just a small comment. Why does the file external.sh have .sh extension if it is javascript file (.js)? Also the following should do what you want in one run, no need for temporary files and multiple sed invocations:
Code:
find sgf/ -iname '*.sgf' | sed -e '1ivar sgfFiles = [' -e '$ { s/.*/"\0" ]/;p;d }' -e 's/.*/"\0",/' > player/external.js