reader: Adopting the new breaking changes in Syncbase API
where db.createTable and db.deleteTable were deprecated in
favour of table.create and table.destroy

Also adding envify as dependency and fixing an issue with
makefile I ran into.

MultiPart: 6/8

Change-Id: I7869db09ad419862c10c2c20081d19b61b39bb38
diff --git a/Makefile b/Makefile
index 693c145..8c13c44 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@
 	v23 go build -a -o $@ v.io/x/ref/cmd/principal
 
 bin/syncbased:
-	v23 go build -a -o $@ v.io/syncbase/x/ref/services/syncbase/syncbased
+	v23 go build -a -o $@ v.io/x/ref/services/syncbase/syncbased
 
 tmp:
 	mkdir -p $@
@@ -89,7 +89,7 @@
 # Easy way to make --v23.permissions.literal?
 .PHONY:
 syncbase: bin/syncbased credentials tmp
-	$(eval blessing := $(shell principal dump --v23.credentials=./credentials -s=true))
+	$(eval blessing := $(shell bin/principal dump --v23.credentials=./credentials -s=true))
 	$(eval email := $(subst dev.v.io/u/,,$(blessing)))
 	./bin/syncbased \
 		--v=5 \
diff --git a/browser/vanadium/syncbase.js b/browser/vanadium/syncbase.js
index 04a935a..e1dff62 100644
--- a/browser/vanadium/syncbase.js
+++ b/browser/vanadium/syncbase.js
@@ -135,8 +135,9 @@
   var runtime = store.runtime;
   var permissions = {};
   var context = timeout(runtime, ms('5s'));
+  var table = db.table(store.tableName);
 
-  db.createTable(context, store.tableName, permissions, ontable);
+  table.create(context, permissions, ontable);
 
   function ontable(err) {
     if (err && !(err instanceof verror.ExistError)) {
diff --git a/package.json b/package.json
index 40c2a74..51eca59 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,8 @@
     "st": "^0.5.4",
     "synthetic-dom-events": "git://github.com/Raynos/synthetic-dom-events",
     "tape": "^4.0.0",
-    "through2": "^2.0.0"
+    "through2": "^2.0.0",
+    "envify": "~3.4.0"
   },
   "dependencies": {
     "browserify": "^11.0.1",