Check for error when getting the number of cd tracks

In the CD ripper, when `cdio_get_num_tracks` returns an error code, you currently get 255 ghost tracks. This pull request changes this so that an an empty table is built instead.