Ensure webdriver session is closed before exiting