Added close function

Just added a method that shuts down the connection to IDA so it'll pack up the databases