Fixed wrong class instantiation.
Added --purge-with-truncate command line option(issue #26).