Create necessary directories if they don't exist