Fixed a race condition.
Changed the chantest to use the new library form of the libchannels.