fix #open for "w"
Merge pull request #1248 from dwightguth/filesystem

fix #open for "w"