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

Signed-off-by: Simon Stewart <simon.m.stewart@gmail.com>