Use fs.stat to check putFile's existence.

This way we bubble up a real Error object

Fixes #3