def encode_env(env)
      env = env.dup
      env.keep_if { |k, v| k =~ /[A-Z]/ }
      env.to_yaml(:Encoding => :Utf8)
    end
def encode_env(env)
      env = env.dup
      env.keep_if { |k, v| k =~ /[A-Z]/ }
      env.to_yaml(:Encoding => :Utf8)
    end
Convert the environment hash to yaml so it can be unserialized later