```ruby
File.open(tdir + '/__MACOSX/._' +tmov, 'w') do |f|
  f.write(generate_metadata)
end
```