Fixing path.resolve issues for nodejs v10