fix truncate() when called with a file that hasn't been written to yet

e.g., if you do:

getFile(..., function (f)
{
f.truncate(0)
});

Taken by itself, this doesn't make sense to do, but it is valid by the
spec, and in an filesystem API wrapper it can happen
Merge pull request #20 from gwynjudd/fix-truncate

fix truncate() when called with a file that hasn't been written to yet