Tiny patch to fix order of checking exists

Latest versions of node complain about this because path.exists is deprecated