prepare media directory