Add custom environment variable handler.

It basically writes the values into files, so they are accessible by
other processes, too.