fix to media directory creation