tests: Simplify tests which use metadata_print

In one of the previous commits metadata_print was modified to accept an
optional argument with a path to its working directory. Use this feature
to make some tests more concise.

Change-Id: Ia5b3a340f92daf83ccb840a87fe0518c386cca25