Check that test is a file before adding it