CBD-958:  compute install_dir early, before $0 is messed up

Change-Id: I64c7f1eaaab124b94d33d10f8dd216ffa0247a43
Reviewed-on: http://review.couchbase.org/27641
Reviewed-by: Philip Labee <philip@couchbase.com>
Reviewed-by: Traun Leyden <tleyden@couchbase.com>
Tested-by: Philip Labee <philip@couchbase.com>