capitests: Use ftruncate instead of seek + write to create test files.