Env dir bug fix.

Signed-off-by: Joao Mares <joaomares@gmail.com>