Update old code in System.io. Fixes #274.
Merge pull request #275 from samuellwn/issue274

Update old code in System.io. Fixes #274.