Refactor test_merge.bash for multiple tests

We will be adding more tests, so make it more of a framework for that.

Also fix up minor lib.yaml formatting bug.

Change-Id: Ic0fe1679f8d62680dfd0acf215c849aa38b913da