[FIX] make sure all necessary directories exist