dirs are only created when needed. fixes #2