get_media: output to dir and get automagic name again.

removed it in f51d804d. but this one is better