Thanks for you reply.But I tried that also but is is also not working.The issue is not with the quotes.I think the issue is in the updation of the image.The new image is updated in the temp folder.But it is not updated even when the page is refreshed.

I have made little changes to your code and posted here the corrected one. The problem seems to be the '\' escape character that you used, which is not required in your case. The changes are marked with red colour.