fixing default base=os.getcwd() evaluated at function definition time