Fix test_query to create the necessary files on the master.

This test will only pass if the task is executed on the master where the input
files are available.