Issue #312 - enforce filesystem limits

Closes #312
I think we want the error to be an actual error object, `new Error('Maximum file size exceeded')`