[nim] Fixing deleting of databag directory before all code that needs it excecutes. In spawn_env script