test-lessons.sh: Assorted cleanups and a new .bowerrc

For projects with dependencies, a local .bowerrc setting '"directory":
"."' avoids the bower_components namespace.  Otherwise this PR is
mostly cleanup tweaks to the Bash script.