Make sure required directories exist