better python open wrapper for handling other optional arguments