Added get_extensions method.

We need a way to check if extension is critical or not, which is not currently possible. I'm not sure whether I should just simply create get_extensions (so it might be useful later, and I feel like there should be a way to get extension itself), or create more specific method for criticality.