prefer fs.exists over deprecated path.exists

This prevents a nuisance warning being written to the console