UTF-8 encoded user-extensions.js support. Fixes issue 1646

I am a Japanese programmer. 
Now I eagerly want to use the Japanese characters in user extension files, especially for Selenium IDE, but I cannot use.
I found a related issue "Issue 1646: UTF-8 encoded user-extensions.js support" in Google Code, 
but the patch proposed there seems not be adopted yet. So I fixed the issue again and created a pull-request.

I am not used to create a pull-requst, so please let me know if there are any problems.