more idiomatic nil? handling

There are a lot of places that check for `obj == nil` and `obj != nil`.
As `nil` is just an object in ruby, it is often considered more
idiomatic to send the #nil? message to an object to check for nil-ness.

Alos, turn the `if ___ != nil` into `unless __.nil?` in order to be more
consistent
explicitly `require` the wavefile gem
extract getting the duration of a wavefile into a method
I hate setting variables to `nil`
ignore generated files