Adding rudimentary characterizer

This code was lifted from the Hydra::Derivatives and modified to
ensure closing of the various pipes.