Fix handling of non ASCII values on ENV

If we set an environment variable with a non ASCII value and we set
Encoding.default_internal the program can crash.

Checking for ASCII values before we proceed to encode solves the
problem.

I don't like using a conditional in the spec, but if we are going to use
the env set by the user while running the spec suite we need to ignore
some of the values.