Fixed issue of incorrect location of 'tables' directory by setting db variable to current working directory

Fixed issue of incorrect location of 'tables' directory by setting db variable to current working directory