Start using os:getenv/2 fun

See #535

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>