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 it does not work.
I found a related issue <a href="https://code.google.com/p/selenium/issues/detail?id=1646">Issue 1646: UTF-8 encoded user-extensions.js support</a> 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.