fix bug, runtime error when force encoding to frozen string object

I've called dup method when uses ENV object in init script.