Cross-platform file write/read test.