Fix bug on failing __init__ in Environment

It was possible, that the __del__ method of an Environment object will
raise an exception, if __init__ raised an exception, because _handle was
not defined at that moment and __del__ will try to access _handle.