Added pa1: writefile.js and prime.js