Work around #128

The autocommands now only call the function if the b:snip_state variable
exists. Otherwise they remove themselves.

This doesn't solve #128, but it should prevent the error from happening.