Check usage of seek() for non-seekable file formats

Currently, `seek()` is used at some points internally, e.g. when calculating `self.frames` within `write()`.

This doesn't work with non-seekable formats, e.g. `'FLAC'`.
`seek()` returns `-1` on error, leading to `self.frames` being `-1`.