Solves race condition on test base directory creation