general: legacy directory pre-creation

* Ensures legacy directories are pre-created
  upon legacy extension setup_app() call.
  (closes #1789)

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
You can use [`logger.exception`](https://docs.python.org/2/library/logging.html#logging.Logger.exception) to keep track of the initial exception.
```python
except OSError:
    app.logger.exception("Cannot property create directory {path} "
                         "for legacy variable {cfg_dir}"
                         .format(path=path, cfg_dir=cfg_dir)