Capture error in Set() and Clear()

Any error state from the File.Write() method was being ignored instead
of being stored so that it could be queried by Err().
Merge pull request #13 from alext/set_clear_error_handling

Capture error in Set() and Clear()