Why not keep things async?  Since this can throw, it's a bit dangerous.  Maybe consider:

```javascript
fs.unlink(tmpfile, function(er) {
  if (code !== 0)
    cb(new Error('exited with status code ' + code)
  else if (er)
    cb(er)
  else
    cb()
})
```