Make directory setups synchronous

Only happens at initilisation, should not cause problems at runtime.
Similar theory to require being sync. Stops race condition.