Fixed string replace for script tags in file