client-test: add function to create a file