Prevent race condition (fixes #134)

this fixes it, I no longer get the uncaught ENOENT error I reported in #134

but I notice there's a lot more calls to `fs.existsSync` throughout the code... might be worth trying to remove them too, for the same reason stated in the issue