centralizes logic for media directory naming into media.image_directory_name (#170)