bugfix

Creating directories *before* using them might be a good idea.