Add auto_close option to new()

Hi,
I don't know whether it was on purpose that the auto_close setting was not set by the new method. I added this because I need it in my scripts. Maybe more people are missing this.