client-test: add function to creating a file