fix bug for copyFileContent

In getFileContent we have read the file using utf8 encoding, if we do
not specified the encoding for writeFile, the output html file will
have all the UTF8 escaped and the apostrophe ` ‘ ‘ will be escaped to
`&apos;’ This bug will cause potential issue in the inline javascript.