Added argv field to struct functional_test.

Moved building of test command line out of functional_test.c into main.c.