More refactoring to set nwpath globally to os.getcwd() if it is not supplied