Better environment handling looking at os.environ instead of sys.argv