Updated wav write code to work with multiple files.