Added guard against 0 samples per frame.
Refactored WaveFile tests for frames count.
Got rid of frame division in WaveFile (closed #6).