veyron/examples/{mdb,todos}: attempt #2 to fix test.sh's

Specific changes:
- Use npm binary from ${VEYRON_ROOT}/environment/cout/node/bin
- Use findunusedport to pick ports
- Use mktemp to generate all file/dir paths

As a side effect, this change addresses most of Asim's remaining comments from https://veyron-review.googlesource.com/3690.

Change-Id: I3a2f2370552282a387c9098d7ad2367b03f501d0
6 files changed
tree: 33727c4fcd9f8068ed27ca55a6f14acc69804ea7
  1. examples/
  2. lib/
  3. products/
  4. runtimes/
  5. security/
  6. services/
  7. tools/