klomp-db: replace slow shell call to stat with perl stat