Add validation checks to wave file reading

Also solved the mystery of the extra two bytes. They happen to be extra
params put there for some reason!