use access instead of exists and use async write
use access instead of exists and use async write

`writeToFile` function uses `exists` which is deprecated. This patch
replaces that with `access` function.

Apart from that, the `writeToFile` function is fully asynchronous now.

yous/new.nodejs.org,marocchino/new.nodejs.org,abdelrahmansaeedhassan/yuri,boneskull/new.nodejs.org,rnsloan/new.nodejs.org,nodejs/new.nodejs.org,strawbrary/nodejs.org,matthewloring/new.nodejs.org,boneskull/new.nodejs.org,strawbrary/nodejs.org,phillipj/new.nodejs.org,nodejs/new.nodejs.org,rnsloan/new.nodejs.org,phillipj/new.nodejs.org,matthewloring/new.nodejs.org,yous/new.nodejs.org,abdelrahmansaeedhassan/yuri,marocchino/new.nodejs.org