working copy of fsopen :)